From 95ed51ceb4bcdac23e8df4edcd64bcf105fb6be8 Mon Sep 17 00:00:00 2001 From: roemhildtg Date: Thu, 12 May 2016 11:00:29 -0500 Subject: [PATCH] Makes config/app dojo-build friendly --- viewer/js/config/app.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/viewer/js/config/app.js b/viewer/js/config/app.js index f8183b401..aca56e23c 100644 --- a/viewer/js/config/app.js +++ b/viewer/js/config/app.js @@ -1,6 +1,7 @@ -(function () { - var path = location.pathname.replace(/[^\/]+$/, ''); - window.dojoConfig = { +define(['dojo/_base/window'], function(window){ + + var path = window.global.location.pathname.replace(/[^\/]+$/, ''); + var dojoConfig = window.global.dojoConfig = { async: true, packages: [ { @@ -26,7 +27,7 @@ ] }; - require(window.dojoConfig, [ + require(dojoConfig, [ 'dojo/_base/declare', // minimal Base Controller @@ -63,4 +64,6 @@ ]))(); controller.startup(); }); -})(); + //we have to return something + return dojoConfig; +});