Skip to content

Commit ba5ca14

Browse files
committed
natch2
1 parent 4dd905c commit ba5ca14

File tree

1 file changed

+6
-3
lines changed
  • libraries/load-themed-styles/src

1 file changed

+6
-3
lines changed

libraries/load-themed-styles/src/index.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,12 @@ function clearStylesInternal(records: IStyleRecord[]): void {
276276
*/
277277
function reloadStyles(): void {
278278
if (_themeState.theme) {
279-
const buffer: ThemableArray = prepareRegisteredThemableStyles();
280-
clearStyles(true);
281-
applyThemableStyles(buffer, undefined, true);
279+
const buffer: ThemableArray[] = [];
280+
for (const styleRecord of _themeState.registeredStyles) {
281+
buffer.push(styleRecord.themableStyle);
282+
}
283+
clearStyles();
284+
applyThemableStyles([].concat.apply([], buffer));
282285
}
283286
}
284287

0 commit comments

Comments
 (0)