diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-06-02 14:00:55 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-06-02 14:24:55 +0200 |
commit | 3bca70999ad6af86d465865eac903f5489130cdd (patch) | |
tree | 80c5688a54ba3c1e3b6060691919458aacd82871 /core/src/OC/legacy-loader.js | |
parent | 1c7d089434f32c8efdb836ab289e85ef897031c4 (diff) | |
download | nextcloud-server-3bca70999ad6af86d465865eac903f5489130cdd.tar.gz nextcloud-server-3bca70999ad6af86d465865eac903f5489130cdd.zip |
Fix some linter warning
Part of my ongoing battle against deprecation messages.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
Diffstat (limited to 'core/src/OC/legacy-loader.js')
-rw-r--r-- | core/src/OC/legacy-loader.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/OC/legacy-loader.js b/core/src/OC/legacy-loader.js index ece9f3c3fc1..273ba3e359f 100644 --- a/core/src/OC/legacy-loader.js +++ b/core/src/OC/legacy-loader.js @@ -20,6 +20,7 @@ */ import $ from 'jquery' +import { generateFilePath } from '@nextcloud/router' const loadedScripts = {} const loadedStyles = [] @@ -37,7 +38,7 @@ export const addScript = (app, script, ready) => { console.warn('OC.addScript is deprecated, use OCP.Loader.loadScript instead') let deferred - const path = OC.filePath(app, 'js', script + '.js') + const path = generateFilePath(app, 'js', script + '.js') if (!loadedScripts[path]) { deferred = $.Deferred() $.getScript(path, () => deferred.resolve()) @@ -59,7 +60,7 @@ export const addScript = (app, script, ready) => { export const addStyle = (app, style) => { console.warn('OC.addStyle is deprecated, use OCP.Loader.loadStylesheet instead') - const path = OC.filePath(app, 'css', style + '.css') + const path = generateFilePath(app, 'css', style + '.css') if (loadedStyles.indexOf(path) === -1) { loadedStyles.push(path) if (document.createStyleSheet) { |