Skip to content

Commit c747465

Browse files
committed
Fix console error when theme changed for off-screen plugin
1 parent 10e7fc8 commit c747465

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

  • packages/perspective-viewer-d3fc/src/js/plugin

packages/perspective-viewer-d3fc/src/js/plugin/plugin.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,13 @@ export function register(...plugins) {
533533
if (settings) {
534534
delete settings["colorStyles"];
535535
delete settings["textStyles"];
536-
initialiseStyles(this._container, this._settings);
537-
this.resize(...args);
536+
if (this.isConnected) {
537+
initialiseStyles(
538+
this._container,
539+
this._settings
540+
);
541+
this.resize(...args);
542+
}
538543
}
539544
}
540545

0 commit comments

Comments
 (0)