diff options
Diffstat (limited to 'core/src/OCP/loader.js')
-rw-r--r-- | core/src/OCP/loader.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/src/OCP/loader.js b/core/src/OCP/loader.js index 7b4e87dd9b4..d307eb27996 100644 --- a/core/src/OCP/loader.js +++ b/core/src/OCP/loader.js @@ -3,6 +3,8 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +import { generateFilePath } from '@nextcloud/router' + const loadedScripts = {} const loadedStylesheets = {} /** @@ -25,7 +27,7 @@ export default { } loadedScripts[key] = true return new Promise(function(resolve, reject) { - const scriptPath = OC.filePath(app, 'js', file) + const scriptPath = generateFilePath(app, 'js', file) const script = document.createElement('script') script.src = scriptPath script.setAttribute('nonce', btoa(OC.requestToken)) @@ -49,7 +51,7 @@ export default { } loadedStylesheets[key] = true return new Promise(function(resolve, reject) { - const stylePath = OC.filePath(app, 'css', file) + const stylePath = generateFilePath(app, 'css', file) const link = document.createElement('link') link.href = stylePath link.type = 'text/css' |