瀏覽代碼

fixed logs clearing

Gildas 7 年之前
父節點
當前提交
93b2840bf8
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      extension/ui/content/content-ui.js

+ 2 - 2
extension/ui/content/content-ui.js

@@ -30,7 +30,7 @@ this.singlefile.ui = this.singlefile.ui || (() => {
 
 	let selectedAreaElement;
 
-	const logsWindowElement = createLogsWindowElement();
+	let logsWindowElement = createLogsWindowElement();
 
 	return {
 		getSelectedArea,
@@ -111,7 +111,7 @@ this.singlefile.ui = this.singlefile.ui || (() => {
 	}
 
 	function clearLogs() {
-		logsWindowElement.childNodes.forEach(node => node.remove());
+		logsWindowElement = createLogsWindowElement();
 	}
 
 	function getSelectedArea() {