Fix: status: 'success' -> success: true
This commit is contained in:
parent
391cfb52dd
commit
90be1dae25
|
@ -346,12 +346,12 @@ function closeTab(tabId, request) {
|
||||||
const {lastError} = chrome.runtime;
|
const {lastError} = chrome.runtime;
|
||||||
if (lastError) {
|
if (lastError) {
|
||||||
resolve({
|
resolve({
|
||||||
status: 'error',
|
success: false,
|
||||||
error: lastError.message || String(lastError)
|
error: lastError.message || String(lastError)
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
resolve({status: 'success'});
|
resolve({success: true});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,8 +22,8 @@ var usercssHelper = (() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function wrapReject(pending) {
|
function wrapReject(pending) {
|
||||||
return pending.then(result => ({status: 'success', result}))
|
return pending.then(result => ({success: true, result}))
|
||||||
.catch(err => ({status: 'error', result: err.message || String(err)}));
|
.catch(err => ({success: false, result: err.message || String(err)}));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Parse the source and find the duplication
|
// Parse the source and find the duplication
|
||||||
|
|
|
@ -4,7 +4,7 @@ function runtimeSend(request) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
chrome.runtime.sendMessage(
|
chrome.runtime.sendMessage(
|
||||||
request,
|
request,
|
||||||
({status, result}) => (status === 'error' ? reject : resolve)(result)
|
({success, result}) => (success ? resolve : reject)(result)
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user