@flrande/bak-extension 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 2026-03-09T05:59:06.644Z
1
+ 2026-03-09T06:27:35.243Z
@@ -330,13 +330,13 @@
330
330
  await this.storage.save(null);
331
331
  return { ok: true };
332
332
  }
333
+ await this.storage.save(null);
333
334
  if (state.windowId !== null) {
334
335
  const existingWindow = await this.browser.getWindow(state.windowId);
335
336
  if (existingWindow) {
336
337
  await this.browser.closeWindow(state.windowId);
337
338
  }
338
339
  }
339
- await this.storage.save(null);
340
340
  return { ok: true };
341
341
  }
342
342
  async resolveTarget(options = {}) {
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@flrande/bak-extension",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "@flrande/bak-protocol": "0.3.3"
6
+ "@flrande/bak-protocol": "0.3.4"
7
7
  },
8
8
  "devDependencies": {
9
9
  "@types/chrome": "^0.1.14",
package/src/workspace.ts CHANGED
@@ -421,13 +421,15 @@ export class WorkspaceManager {
421
421
  await this.storage.save(null);
422
422
  return { ok: true };
423
423
  }
424
+ // Clear persisted state before closing the window so tab/window removal
425
+ // listeners cannot race and resurrect an empty workspace record.
426
+ await this.storage.save(null);
424
427
  if (state.windowId !== null) {
425
428
  const existingWindow = await this.browser.getWindow(state.windowId);
426
429
  if (existingWindow) {
427
430
  await this.browser.closeWindow(state.windowId);
428
431
  }
429
432
  }
430
- await this.storage.save(null);
431
433
  return { ok: true };
432
434
  }
433
435