diff options
author | Chocobozzz <me@florianbigard.com> | 2019-08-20 09:01:19 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-08-20 09:01:19 +0200 |
commit | 0c503f5c87ec0fbd764ece910a5b11809303cb79 (patch) | |
tree | f8068bec1a282bb744aad3c58516136949bb5033 /client/src/app/core/plugins/plugin.service.ts | |
parent | b5addd536fe3b42ee662a58020c1adf0278f74d0 (diff) | |
download | PeerTube-0c503f5c87ec0fbd764ece910a5b11809303cb79.tar.gz PeerTube-0c503f5c87ec0fbd764ece910a5b11809303cb79.tar.zst PeerTube-0c503f5c87ec0fbd764ece910a5b11809303cb79.zip |
Fix bad import on FF ESR
Diffstat (limited to 'client/src/app/core/plugins/plugin.service.ts')
-rw-r--r-- | client/src/app/core/plugins/plugin.service.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/app/core/plugins/plugin.service.ts b/client/src/app/core/plugins/plugin.service.ts index 3bb82e8a9..3af36765a 100644 --- a/client/src/app/core/plugins/plugin.service.ts +++ b/client/src/app/core/plugins/plugin.service.ts | |||
@@ -18,6 +18,7 @@ import { PublicServerSetting } from '@shared/models/plugins/public-server.settin | |||
18 | import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' | 18 | import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils' |
19 | import { RegisterClientHelpers } from '../../../types/register-client-option.model' | 19 | import { RegisterClientHelpers } from '../../../types/register-client-option.model' |
20 | import { PluginTranslation } from '@shared/models/plugins/plugin-translation.model' | 20 | import { PluginTranslation } from '@shared/models/plugins/plugin-translation.model' |
21 | import { importModule } from '@app/shared/misc/utils' | ||
21 | 22 | ||
22 | interface HookStructValue extends RegisterClientHookOptions { | 23 | interface HookStructValue extends RegisterClientHookOptions { |
23 | plugin: ServerConfigPlugin | 24 | plugin: ServerConfigPlugin |
@@ -222,7 +223,7 @@ export class PluginService implements ClientHook { | |||
222 | console.log('Loading script %s of plugin %s.', clientScript.script, plugin.name) | 223 | console.log('Loading script %s of plugin %s.', clientScript.script, plugin.name) |
223 | 224 | ||
224 | return this.zone.runOutsideAngular(() => { | 225 | return this.zone.runOutsideAngular(() => { |
225 | return import(/* webpackIgnore: true */ clientScript.script) | 226 | return importModule(clientScript.script) |
226 | .then((script: ClientScriptModule) => script.register({ registerHook, peertubeHelpers })) | 227 | .then((script: ClientScriptModule) => script.register({ registerHook, peertubeHelpers })) |
227 | .then(() => this.sortHooksByPriority()) | 228 | .then(() => this.sortHooksByPriority()) |
228 | .catch(err => console.error('Cannot import or register plugin %s.', pluginInfo.plugin.name, err)) | 229 | .catch(err => console.error('Cannot import or register plugin %s.', pluginInfo.plugin.name, err)) |