aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-24 16:48:54 +0200
committerChocobozzz <me@florianbigard.com>2023-05-24 16:56:05 +0200
commit54909304287f3c04dcfb39660be8ead57dc95440 (patch)
tree478f1b913f3bd4c3bbaa17525f0114c5b0a8689d /client/src/app/shared/shared-custom-markup/dynamic-element.service.ts
parentd0fbc9fd0a29c37f3ff9b99030351e90b276fe7d (diff)
downloadPeerTube-54909304287f3c04dcfb39660be8ead57dc95440.tar.gz
PeerTube-54909304287f3c04dcfb39660be8ead57dc95440.tar.zst
PeerTube-54909304287f3c04dcfb39660be8ead57dc95440.zip
Remove suppressImplicitAnyIndexErrors
It's deprecated by TS
Diffstat (limited to 'client/src/app/shared/shared-custom-markup/dynamic-element.service.ts')
-rw-r--r--client/src/app/shared/shared-custom-markup/dynamic-element.service.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts b/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts
index 208dba721..a12907055 100644
--- a/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts
+++ b/client/src/app/shared/shared-custom-markup/dynamic-element.service.ts
@@ -10,6 +10,7 @@ import {
10 SimpleChanges, 10 SimpleChanges,
11 Type 11 Type
12} from '@angular/core' 12} from '@angular/core'
13import { objectKeysTyped } from '@shared/core-utils'
13 14
14@Injectable() 15@Injectable()
15export class DynamicElementService { 16export class DynamicElementService {
@@ -41,12 +42,12 @@ export class DynamicElementService {
41 setModel <T> (componentRef: ComponentRef<T>, attributes: Partial<T>) { 42 setModel <T> (componentRef: ComponentRef<T>, attributes: Partial<T>) {
42 const changes: SimpleChanges = {} 43 const changes: SimpleChanges = {}
43 44
44 for (const key of Object.keys(attributes)) { 45 for (const key of objectKeysTyped(attributes)) {
45 const previousValue = componentRef.instance[key] 46 const previousValue = componentRef.instance[key]
46 const newValue = attributes[key] 47 const newValue = attributes[key]
47 48
48 componentRef.instance[key] = newValue 49 componentRef.instance[key] = newValue
49 changes[key] = new SimpleChange(previousValue, newValue, previousValue === undefined) 50 changes[key as string] = new SimpleChange(previousValue, newValue, previousValue === undefined)
50 } 51 }
51 52
52 const component = componentRef.instance 53 const component = componentRef.instance