Arthur Bogaart pushed to branch feature/cmng-psp1 at cms-community / 
hippo-addon-channel-manager


Commits:
3d224dc8 by Arthur Bogaart at 2016-03-15T13:15:41+01:00
CHANNELMGR-495 Fixed wrong usage of $document

- - - - -


2 changed files:

- frontend-ng/src/angularjs/utils/dom.service.js
- frontend-ng/src/angularjs/utils/dom.service.spec.js


Changes:

=====================================
frontend-ng/src/angularjs/utils/dom.service.js
=====================================
--- a/frontend-ng/src/angularjs/utils/dom.service.js
+++ b/frontend-ng/src/angularjs/utils/dom.service.js
@@ -25,7 +25,7 @@ export class DomService {
   }
 
   getAppRootUrl() {
-    const location = this.$document.location;
+    const location = this.$document[0].location;
     const appPath = location.pathname.substring(0, location.pathname.length - 
'index.html'.length);
     return `//${location.host}${appPath}`;
   }


=====================================
frontend-ng/src/angularjs/utils/dom.service.spec.js
=====================================
--- a/frontend-ng/src/angularjs/utils/dom.service.spec.js
+++ b/frontend-ng/src/angularjs/utils/dom.service.spec.js
@@ -24,12 +24,12 @@ describe('DomService', function () {
     module('hippo-cm.utils');
 
     module(function ($provide) {
-      $provide.value('$document', {
+      $provide.value('$document', [{
         location: {
           pathname: '/app/root/index.html',
           host: 'localhost:8080',
         },
-      });
+      }]);
     });
 
     inject(function (_DomService_) {



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-addon-channel-manager/commit/3d224dc87b04f8b94f47b3781a72f01e9880ad8f
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to