diff options
Diffstat (limited to 'ext/js/display/display.js')
-rw-r--r-- | ext/js/display/display.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/js/display/display.js b/ext/js/display/display.js index 6895ea74..7bfe3add 100644 --- a/ext/js/display/display.js +++ b/ext/js/display/display.js @@ -1571,7 +1571,11 @@ class Display extends EventDispatcher { audioDetails = {sources: sources2, preferredAudioIndex, customSourceUrl, customSourceType}; } - const screenshotDetails = (AnkiUtil.fieldsObjectContainsMarker(fields, 'screenshot') ? {tabId: this._contentOriginTabId, frameId: this._contentOriginFrameId, format, quality} : null); + const screenshotDetails = ( + AnkiUtil.fieldsObjectContainsMarker(fields, 'screenshot') && typeof this._contentOriginTabId === 'number' ? + {tabId: this._contentOriginTabId, frameId: this._contentOriginFrameId, format, quality} : + null + ); const clipboardDetails = { image: AnkiUtil.fieldsObjectContainsMarker(fields, 'clipboard-image'), |