From cf1e9c51ded86802e20a68ab4213cf402049073f Mon Sep 17 00:00:00 2001 From: tobiu Date: Thu, 30 Jan 2025 20:39:09 +0100 Subject: [PATCH] main.addon.AmCharts: loadFiles() => adjust the fallback path for the GH pages deployment #6350 --- src/main/addon/AmCharts.mjs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/addon/AmCharts.mjs b/src/main/addon/AmCharts.mjs index acf4e45c5..ddd28d73f 100644 --- a/src/main/addon/AmCharts.mjs +++ b/src/main/addon/AmCharts.mjs @@ -193,8 +193,19 @@ class AmCharts extends Base { * @param {Boolean} useFallback=false */ loadFiles(useFallback=false) { - let me = this, - basePath = (me.useFallbackPath || useFallback) ? me.fallbackPath : me.downloadPath; + let me = this, + useFallbackPath = me.useFallbackPath || useFallback, + basePath; + + if (useFallbackPath && Neo.config.isGitHubPages) { + basePath = '../../../../resources_pub/amCharts/'; + + if (Neo.config.environment !== 'development') { + basePath = `../../${basePath}` + } + } else { + basePath = useFallbackPath ? me.fallbackPath : me.downloadPath + } me.isLoading = true;