Ver código fonte

fixed logs clearing

Gildas 7 anos atrás
pai
commit
93b2840bf8
1 arquivos alterados com 2 adições e 2 exclusões
  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() {