Commit 7aefd13
committed
Fix: guard screen access for service worker context
The background.js service worker does not have access to the window
screen object. Accessing screen.width threw a ReferenceError which
silently prevented startSession() from completing and blocked all
annotation saves.
Added typeof screen !== 'undefined' guard so screenResolution falls
back to 'N/A' when running in service worker context.
https://claude.ai/code/session_013y1QH2gkj8wg427JpzjdJe1 parent 0faa8df commit 7aefd13
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments