File tree 1 file changed +8
-1
lines changed
client/modules/IDE/components
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -143,10 +143,17 @@ class PreviewFrame extends React.Component {
143
143
return newContent ;
144
144
}
145
145
146
+ mergeLocalFilesAndEditorActiveFile ( ) {
147
+ const files = this . props . files . slice ( ) ;
148
+ const activeFileInEditor = this . props . cmController . getContent ( ) ;
149
+ files . find ( file => file . id === activeFileInEditor . id ) . content = activeFileInEditor . content ;
150
+ return files ;
151
+ }
152
+
146
153
injectLocalFiles ( ) {
147
154
const htmlFile = this . props . htmlFile . content ;
148
155
let scriptOffs = [ ] ;
149
- const files = this . props . files . slice ( ) ;
156
+ const files = this . mergeLocalFilesAndEditorActiveFile ( ) ;
150
157
const activeFileInEditor = this . props . cmController . getContent ( ) ;
151
158
files . find ( file => file . id === activeFileInEditor . id ) . content = activeFileInEditor . content ;
152
159
const resolvedFiles = this . resolveJSAndCSSLinks ( files ) ;
You can’t perform that action at this time.
0 commit comments