From e367985fa87f3ad2992f4b321a2f40aea9cb4a77 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sat, 7 Dec 2013 11:56:22 -0700 Subject: [PATCH] window.env not available on frontpage, @paglias is this an ok workaround? --- public/js/services/userServices.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/js/services/userServices.js b/public/js/services/userServices.js index 157aa322fd..c945cb3cdd 100644 --- a/public/js/services/userServices.js +++ b/public/js/services/userServices.js @@ -56,7 +56,7 @@ angular.module('userServices', []). 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) { //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) {