From 77d867650ad703bf6e6e7b7a31a0522669c4542b Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 13 Feb 2019 12:38:37 +0100 Subject: [PATCH 1/2] Catching of scripts problem solution. --- Scripts/AppLoader.js | 7 ++++++- index.html | 4 ++++ server.js | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Scripts/AppLoader.js b/Scripts/AppLoader.js index 68f1fd9dd..7f3a26ca1 100644 --- a/Scripts/AppLoader.js +++ b/Scripts/AppLoader.js @@ -107,10 +107,15 @@ ]; let downloadedCounter = 0; + let versionParam = window.canvasApp.version; + if (versionParam === undefined) { versionParam = ''; } + else { + versionParam = '?' + versionParam; + } for (let i = 0; i < modulesArray.length; i++) { - let path = window.canvasApp.urlPrefix + modulesArray[i]; + let path = window.canvasApp.urlPrefix + modulesArray[i] + versionParam; REQUIREJS([path], onRequired); diff --git a/index.html b/index.html index 97dd99762..577e9b781 100644 --- a/index.html +++ b/index.html @@ -15,11 +15,15 @@ = 0) { /* @@ -201,7 +200,8 @@ function onBrowserRequest(request, response) { return; } - + requestParameters = request.url.split("?"); // Remove version information + requestParameters = requestParameters[0].split("/"); switch (requestParameters[1]) { From 026ae12610dfafd5104691cb29216b844eb5f79c Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Wed, 13 Feb 2019 18:12:31 +0100 Subject: [PATCH 2/2] Possible Race Condition needed Ecosystem File to be loaded first --- Scripts/AppLoader.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Scripts/AppLoader.js b/Scripts/AppLoader.js index 7f3a26ca1..df91d25a9 100644 --- a/Scripts/AppLoader.js +++ b/Scripts/AppLoader.js @@ -27,7 +27,9 @@ /* PlotterPanels */ + "Globals.js", + "Ecosystem.js", "BottomSpace/DeleteTradingHistory.js", "BottomSpace/ChartAspectRatio.js", @@ -81,7 +83,6 @@ "ProductStorage.js", "CompetitionStorage.js", "ProductCard.js", - "Ecosystem.js", "SplashScreen.js", "Canvas.js",