File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
.storybook/addons/codeEditorAddon Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ export const withCodeEditor = makeDecorator({
198198 doc . open ( ) ;
199199 doc . write ( docContent ) ;
200200 doc . close ( ) ;
201- } ) ;
201+ } , { once : true } ) ;
202202
203203 storyElement . className = 'story-mgt-preview' ;
204204 storyElement . setAttribute ( 'title' , 'preview' ) ;
Original file line number Diff line number Diff line change @@ -177,6 +177,7 @@ export class EditorElement extends LitElement {
177177 }
178178
179179 disconnectedCallback ( ) {
180+ this . editor . removeEventListener ( 'fileUpdated' ) ;
180181 window . removeEventListener ( 'resize' , this . handleResize ) ;
181182 }
182183
@@ -193,7 +194,7 @@ export class EditorElement extends LitElement {
193194 this . editor . restoreViewState ( this . currentEditorState . state ) ;
194195 }
195196
196- if ( this . autoFormat ) {
197+ if ( this . autoFormat ) {
197198 this . editor . getAction ( 'editor.action.formatDocument' ) . run ( ) ;
198199 }
199200 }
You can’t perform that action at this time.
0 commit comments