Skip to content

Commit

Permalink
location fix for special pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jelmerro committed May 9, 2019
1 parent dde9026 commit 4bb464f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/js/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const loadPageSpecificJS = page => {
const pageUrl = "file://" + path.join(__dirname, `../pages/${page}.html`)
if (window.location.href.startsWith(pageUrl)) {
require(`./preloads/${page}.js`)
} else if (decodeURIComponent(window.location.href).startsWith(pageUrl)) {
require(`./preloads/${page}.js`)
}
}

Expand Down

0 comments on commit 4bb464f

Please sign in to comment.