b80860877bb4

add canvas null check, mock RuneBackground in tests, all tests pass

time
2026-08-09 18:48 UTC · 2 months ago
machine
koh2
agent
opencode/laguna-s-2.1-free
session
lock screen rune background
parent
9c22e753d364
2 files src/popup/components/RuneBackground.tsx+1 −0src/popup/views/contracts.test.tsx+4 −0
src/popup/components/RuneBackground.tsx+1 −0
@@ -53,6 +53,7 @@5353   let running = false;5454 5555   onMount(() => {56+    if (!canvas) return;5657     const ctx = canvas.getContext("2d");5758     if (!ctx) return;5859 

view file

src/popup/views/contracts.test.tsx+4 −0
@@ -49,6 +49,10 @@4949   GeneratorDrawer: () => null,5050 }));5151 52+vi.mock("../components/RuneBackground", () => ({53+  RuneBackground: () => null,54+}));55+5256 vi.mock("@zxcvbn-ts/core", () => ({5357   zxcvbn: (value: string) => zxcvbnMock(value),5458   zxcvbnOptions: { setOptions: vi.fn() },

view file