Browse Source

fixed error if tab data is not found

Gildas 7 years ago
parent
commit
ac7d51fa3b
1 changed files with 3 additions and 1 deletions
  1. 3 1
      extension/ui/bg/ui-button.js

+ 3 - 1
extension/ui/bg/ui-button.js

@@ -133,7 +133,9 @@ singlefile.ui.button = (() => {
 		const autoSave = await singlefile.ui.autosave.isEnabled(tab.id);
 		if (reset) {
 			const tabsData = await singlefile.storage.getTemporary();
-			tabsData[tab.id].button = null;
+			if (tabsData[tab.id]) {
+				tabsData[tab.id].button = null;
+			}
 		}
 		const properties = await getCurrentProperties(tab.id, { autoSave });
 		await refresh(tab.id, properties, true);