Browse Source

removed useless code

Gildas 7 năm trước cách đây
mục cha
commit
5de2bf86bd
1 tập tin đã thay đổi với 1 bổ sung9 xóa
  1. 1 9
      extension/core/bg/core.js

+ 1 - 9
extension/core/bg/core.js

@@ -29,15 +29,7 @@ singlefile.core = (() => {
 	async function saveTab(tab, processOptions) {
 		const options = await singlefile.config.get();
 		Object.keys(processOptions).forEach(key => options[key] = processOptions[key]);
-		return new Promise(async (resolve, reject) => {
-			const processPromise = singlefile.scriptLoader.executeScripts(tab, options);
-			try {
-				await processPromise;
-			} catch (error) {
-				reject(error);
-			}
-			resolve();
-		});
+		return singlefile.scriptLoader.executeScripts(tab, options);
 	}
 
 	async function autoSaveTab(tab) {