mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
window.env not available on frontpage, @paglias is this an ok workaround?
This commit is contained in:
@@ -56,7 +56,7 @@ angular.module('userServices', []).
|
|||||||
sent.push(queue.shift());
|
sent.push(queue.shift());
|
||||||
});
|
});
|
||||||
|
|
||||||
$http.post(API_URL + '/api/v1/user/batch-update', sent, {params: {data:+new Date, _v:user._v, siteVersion: $window.env.siteVersion}})
|
$http.post(API_URL + '/api/v1/user/batch-update', sent, {params: {data:+new Date, _v:user._v, siteVersion: $window.env && $window.env.siteVersion}})
|
||||||
.success(function (data, status, heacreatingders, config) {
|
.success(function (data, status, heacreatingders, config) {
|
||||||
//make sure there are no pending actions to sync. If there are any it is not safe to apply model from server as we may overwrite user data.
|
//make sure there are no pending actions to sync. If there are any it is not safe to apply model from server as we may overwrite user data.
|
||||||
if (!queue.length) {
|
if (!queue.length) {
|
||||||
|
|||||||
Reference in New Issue
Block a user