File tree 1 file changed +3
-4
lines changed 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -153,10 +153,9 @@ function togglePreviewDisplay(previewable) {
153
153
154
154
export async function createCodeEditor ( textarea , filenameInput ) {
155
155
const filename = basename ( filenameInput . value ) ;
156
- const previewableExts = ( textarea . getAttribute ( 'data-previewable-extensions' ) || '' ) . split ( ',' ) ;
157
- const previewableExtsSet = new Set ( previewableExts ) ;
156
+ const previewableExts = new Set ( ( textarea . getAttribute ( 'data-previewable-extensions' ) || '' ) . split ( ',' ) ) ;
158
157
const lineWrapExts = ( textarea . getAttribute ( 'data-line-wrap-extensions' ) || '' ) . split ( ',' ) ;
159
- const previewable = previewableExtsSet . has ( extname ( filename ) ) ;
158
+ const previewable = previewableExts . has ( extname ( filename ) ) ;
160
159
const editorConfig = getEditorconfig ( filenameInput ) ;
161
160
162
161
togglePreviewDisplay ( previewable ) ;
@@ -169,7 +168,7 @@ export async function createCodeEditor(textarea, filenameInput) {
169
168
170
169
const debounceInputHandler = debounce ( 500 , ( ) => {
171
170
const filename = filenameInput . value ;
172
- const previewable = previewableExtsSet . has ( extname ( filename ) ) ;
171
+ const previewable = previewableExts . has ( extname ( filename ) ) ;
173
172
togglePreviewDisplay ( previewable ) ;
174
173
updateEditor ( monaco , editor , filename , lineWrapExts ) ;
175
174
} ) ;
You can’t perform that action at this time.
0 commit comments