diff options
Diffstat (limited to 'core/src/OCP/loader.js')
-rw-r--r-- | core/src/OCP/loader.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/src/OCP/loader.js b/core/src/OCP/loader.js index 7f72c47ca64..293af9bbec2 100644 --- a/core/src/OCP/loader.js +++ b/core/src/OCP/loader.js @@ -20,8 +20,8 @@ * */ -let loadedScripts = {} -let loadedStylesheets = {} +const loadedScripts = {} +const loadedStylesheets = {} /** * @namespace OCP * @class Loader @@ -42,8 +42,8 @@ export default { } loadedScripts[key] = true return new Promise(function(resolve, reject) { - var scriptPath = OC.filePath(app, 'js', file) - var script = document.createElement('script') + const scriptPath = OC.filePath(app, 'js', file) + const script = document.createElement('script') script.src = scriptPath script.setAttribute('nonce', btoa(OC.requestToken)) script.onload = () => resolve() @@ -66,8 +66,8 @@ export default { } loadedStylesheets[key] = true return new Promise(function(resolve, reject) { - var stylePath = OC.filePath(app, 'css', file) - var link = document.createElement('link') + const stylePath = OC.filePath(app, 'css', file) + const link = document.createElement('link') link.href = stylePath link.type = 'text/css' link.rel = 'stylesheet' @@ -75,5 +75,5 @@ export default { link.onerror = () => reject(new Error(`Failed to load stylesheet from ${stylePath}`)) document.head.appendChild(link) }) - } + }, } |