diff options
Diffstat (limited to 'client/src/root-helpers')
-rw-r--r-- | client/src/root-helpers/bytes.ts | 2 | ||||
-rw-r--r-- | client/src/root-helpers/peertube-web-storage.ts | 4 | ||||
-rw-r--r-- | client/src/root-helpers/plugins-manager.ts | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/client/src/root-helpers/bytes.ts b/client/src/root-helpers/bytes.ts index ec8b55faa..bda786cc6 100644 --- a/client/src/root-helpers/bytes.ts +++ b/client/src/root-helpers/bytes.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | const dictionary: Array<{ max: number; type: string }> = [ | 1 | const dictionary: Array<{ max: number, type: string }> = [ |
2 | { max: 1024, type: 'B' }, | 2 | { max: 1024, type: 'B' }, |
3 | { max: 1048576, type: 'KB' }, | 3 | { max: 1048576, type: 'KB' }, |
4 | { max: 1073741824, type: 'MB' }, | 4 | { max: 1073741824, type: 'MB' }, |
diff --git a/client/src/root-helpers/peertube-web-storage.ts b/client/src/root-helpers/peertube-web-storage.ts index d4cad8a20..68a2462de 100644 --- a/client/src/root-helpers/peertube-web-storage.ts +++ b/client/src/root-helpers/peertube-web-storage.ts | |||
@@ -5,7 +5,7 @@ const valuesMap = new Map() | |||
5 | function proxify (instance: MemoryStorage) { | 5 | function proxify (instance: MemoryStorage) { |
6 | return new Proxy(instance, { | 6 | return new Proxy(instance, { |
7 | set: function (obj, prop: string | symbol, value) { | 7 | set: function (obj, prop: string | symbol, value) { |
8 | if (MemoryStorage.prototype.hasOwnProperty(prop)) { | 8 | if (Object.prototype.hasOwnProperty.call(MemoryStorage, prop)) { |
9 | // FIXME: symbol typing issue https://github.com/microsoft/TypeScript/issues/1863 | 9 | // FIXME: symbol typing issue https://github.com/microsoft/TypeScript/issues/1863 |
10 | instance[prop as any] = value | 10 | instance[prop as any] = value |
11 | } else { | 11 | } else { |
@@ -14,7 +14,7 @@ function proxify (instance: MemoryStorage) { | |||
14 | return true | 14 | return true |
15 | }, | 15 | }, |
16 | get: function (target, name: string | symbol | number) { | 16 | get: function (target, name: string | symbol | number) { |
17 | if (MemoryStorage.prototype.hasOwnProperty(name)) { | 17 | if (Object.prototype.hasOwnProperty.call(MemoryStorage, name)) { |
18 | // FIXME: symbol typing issue https://github.com/microsoft/TypeScript/issues/1863 | 18 | // FIXME: symbol typing issue https://github.com/microsoft/TypeScript/issues/1863 |
19 | return instance[name as any] | 19 | return instance[name as any] |
20 | } | 20 | } |
diff --git a/client/src/root-helpers/plugins-manager.ts b/client/src/root-helpers/plugins-manager.ts index d14ac4acd..f1687d91d 100644 --- a/client/src/root-helpers/plugins-manager.ts +++ b/client/src/root-helpers/plugins-manager.ts | |||
@@ -155,7 +155,7 @@ class PluginsManager { | |||
155 | try { | 155 | try { |
156 | if (!isReload) this.loadedScopes.push(scope) | 156 | if (!isReload) this.loadedScopes.push(scope) |
157 | 157 | ||
158 | const toLoad = this.scopes[ scope ] | 158 | const toLoad = this.scopes[scope] |
159 | if (!Array.isArray(toLoad)) { | 159 | if (!Array.isArray(toLoad)) { |
160 | this.loadingScopes[scope] = false | 160 | this.loadingScopes[scope] = false |
161 | this.pluginsLoaded[scope].next(true) | 161 | this.pluginsLoaded[scope].next(true) |
@@ -168,11 +168,11 @@ class PluginsManager { | |||
168 | for (const pluginInfo of toLoad) { | 168 | for (const pluginInfo of toLoad) { |
169 | const clientScript = pluginInfo.clientScript | 169 | const clientScript = pluginInfo.clientScript |
170 | 170 | ||
171 | if (this.loadedScripts[ clientScript.script ]) continue | 171 | if (this.loadedScripts[clientScript.script]) continue |
172 | 172 | ||
173 | promises.push(this.loadPlugin(pluginInfo)) | 173 | promises.push(this.loadPlugin(pluginInfo)) |
174 | 174 | ||
175 | this.loadedScripts[ clientScript.script ] = true | 175 | this.loadedScripts[clientScript.script] = true |
176 | } | 176 | } |
177 | 177 | ||
178 | await Promise.all(promises) | 178 | await Promise.all(promises) |