Sfoglia il codice sorgente

empty doc and win later

Former-commit-id: 8d83d5d9d5d5052cf55f6aa2826860dda10646fd
= 6 anni fa
parent
commit
ebbcf49917
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      lib/single-file/single-file-core.js

+ 2 - 2
lib/single-file/single-file-core.js

@@ -195,8 +195,6 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 			if (this.root && this.options.doc) {
 				util.postProcessDoc(this.options.doc, this.markedElements);
 			}
-			this.options.doc = null;
-			this.options.win = null;
 		}
 
 		cancel() {
@@ -228,6 +226,8 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
 				this.onprogress(new ProgressEvent(RESOURCE_LOADED, detail));
 			}, this.options);
 			await this.pendingPromises;
+			this.options.doc = null;
+			this.options.win = null;
 			await this.executeStage(REPLACE_DOCS_STAGE);
 			await this.executeStage(POST_PROCESS_STAGE);
 			this.processor.finalize();