Skip to content

Commit

Permalink
main.addon.AmCharts: loadFiles() => adjust the fallback path for the …
Browse files Browse the repository at this point in the history
…GH pages deployment #6350
  • Loading branch information
tobiu committed Jan 30, 2025
1 parent cb336f1 commit cf1e9c5
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/main/addon/AmCharts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit cf1e9c5

Please sign in to comment.