8.0.0 #3

Merged
wanhose merged 30 commits from v8.0.0 into main 2024-10-15 15:01:19 +00:00
2 changed files with 5 additions and 6 deletions
Showing only changes of commit c76192ffaf - Show all commits

View File

@ -7,7 +7,7 @@
/** /**
* @typedef {Object} ExtensionState * @typedef {Object} ExtensionState
* @property {ExtensionIssue} issue * @property {ExtensionIssue} [issue]
* @property {boolean} on * @property {boolean} on
*/ */
@ -146,7 +146,7 @@ async function getState(hostname) {
state.issue = await refreshIssue(hostname); state.issue = await refreshIssue(hostname);
} }
return state; return { ...stateByDefault, ...state };
} }
/** /**

View File

@ -7,9 +7,8 @@
*/ */
/** /**
* @typedef {Object} ExtensionState * @typedef {Object} ContentState
* @property {boolean} on * @property {boolean} on
* @property {ExtensionIssue} [issue]
*/ */
/** /**
@ -97,7 +96,7 @@ const seen = new Set();
/** /**
* @description Extension state * @description Extension state
* @type {ExtensionState} * @type {ContentState}
*/ */
let state = { on: true }; let state = { on: true };
@ -415,7 +414,7 @@ function run(params = {}) {
* @param {SetUpParams} [params] * @param {SetUpParams} [params]
*/ */
async function setUp(params = {}) { async function setUp(params = {}) {
state = (await dispatch({ hostname, type: 'GET_STATE' })) ?? state; state = await dispatch({ hostname, type: 'GET_STATE' });
dispatch({ type: 'ENABLE_POPUP' }); dispatch({ type: 'ENABLE_POPUP' });
if (state.on) { if (state.on) {