File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1201,13 +1201,24 @@ namespace Component {
12011201 return resultBuilder
12021202
12031203 function applyExtensions ( component : Component ) {
1204- if ( ! component || SYMBOL_EXTENSIONS_APPLIED in component )
1204+ if ( ! component )
1205+ return component
1206+
1207+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
1208+ const editableComponent = component as any
1209+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
1210+ let extensionsApplied = editableComponent [ SYMBOL_EXTENSIONS_APPLIED ] as unknown [ ] | undefined
1211+ if ( extensionsApplied ?. includes ( realBuilder ) )
12051212 return component
12061213
12071214 for ( const extension of extensions )
12081215 Object . assign ( component , extension ( component ) )
12091216
1210- Object . defineProperty ( component , SYMBOL_EXTENSIONS_APPLIED , { value : true } )
1217+ if ( ! extensionsApplied )
1218+ Object . defineProperty ( component , SYMBOL_EXTENSIONS_APPLIED , { value : extensionsApplied = [ ] } )
1219+
1220+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
1221+ editableComponent [ SYMBOL_EXTENSIONS_APPLIED ] . push ( realBuilder )
12111222 return component
12121223 }
12131224
You can’t perform that action at this time.
0 commit comments