Skip to content

Commit

Permalink
fix #26
Browse files Browse the repository at this point in the history
  • Loading branch information
AprilSylph committed Apr 2, 2022
1 parent 09bbfe6 commit ab447e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ browser.webRequest.onBeforeRequest.addListener(({ method, requestBody, requestId

const hasContent = Array.isArray(content);
const isAsk = state === 'ask';
const isPrivateAnswer = state === undefined && isPrivate === true && layout[0].type === 'ask';
const isPrivateAnswer = state === undefined && isPrivate === true && layout.some(({ type }) => type === 'ask');

if (hasContent && (isAsk || isPrivateAnswer)) {
browser.storage.local.set({ [timeStamp]: { recipient, content, layout } });
Expand Down

0 comments on commit ab447e8

Please sign in to comment.