correct absolute url creation in helper, again
authorymh <ymh.work@gmail.com>
Wed, 23 Nov 2016 11:29:37 +0100
changeset 441 65a6c640de7a
parent 440 2206d4330b60
child 442 58ce952af5b0
correct absolute url creation in helper, again
cms/app-client/app/helpers/abs-url-for.js
--- a/cms/app-client/app/helpers/abs-url-for.js	Wed Nov 23 09:53:31 2016 +0100
+++ b/cms/app-client/app/helpers/abs-url-for.js	Wed Nov 23 11:29:37 2016 +0100
@@ -10,11 +10,10 @@
 
   compute([routeName, ...routeParams]) {
     let router = this.get('router');
-    let rootUrl = ENV.APP.backRootURL;
 
     var resUrl = Ember.isEmpty(routeParams) ?
       router.generate(routeName) : router.generate(routeName, routeParams[0]);
     var location = window.location;
-    return  location.protocol + "//" + location.host + rootUrl + resUrl;
+    return  location.protocol + "//" + location.host + location.pathname + resUrl;
   }
 });