Skip to content

Commit 57e35f8

Browse files
committed
fix no stylesheet service
1 parent 1434a70 commit 57e35f8

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

packages/web-component-designer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"description": "A WYSIWYG designer webcomponent for html components",
33
"name": "@node-projects/web-component-designer",
4-
"version": "0.1.261",
4+
"version": "0.1.262",
55
"type": "module",
66
"main": "./dist/index.js",
77
"author": "jochen.kuehner@gmx.de",

packages/web-component-designer/src/elements/documentContainer.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ export class DocumentContainer extends BaseCustomWebComponentLazyAppend implemen
4444
private _additionalStylesheets: IStylesheet[];
4545
public set additionalStylesheets(stylesheets: IStylesheet[]) {
4646
this._additionalStylesheets = stylesheets;
47-
if (this.designerView.instanceServiceContainer.stylesheetService)
47+
if (this.designerView.instanceServiceContainer.stylesheetService) {
4848
this.designerView.instanceServiceContainer.stylesheetService.setStylesheets(stylesheets);
49-
if (!this._stylesheetChangedEventRegistered) {
50-
this._stylesheetChangedEventRegistered = true;
51-
this.designerView.instanceServiceContainer.stylesheetService.stylesheetChanged.on(e => this.additionalStylesheetChanged.emit({ name: e.name, newStyle: e.newStyle, oldStyle: e.oldStyle, changeSource: e.changeSource }));
49+
if (!this._stylesheetChangedEventRegistered) {
50+
this._stylesheetChangedEventRegistered = true;
51+
this.designerView.instanceServiceContainer.stylesheetService.stylesheetChanged.on(e => this.additionalStylesheetChanged.emit({ name: e.name, newStyle: e.newStyle, oldStyle: e.oldStyle, changeSource: e.changeSource }));
52+
}
5253
}
5354
};
5455
public get additionalStylesheets() {

0 commit comments

Comments
 (0)