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;
|
||||
if (lastError) {
|
||||
resolve({
|
||||
status: 'error',
|
||||
success: false,
|
||||
error: lastError.message || String(lastError)
|
||||
});
|
||||
return;
|
||||
}
|
||||
resolve({status: 'success'});
|
||||
resolve({success: true});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -22,8 +22,8 @@ var usercssHelper = (() => {
|
|||
}
|
||||
|
||||
function wrapReject(pending) {
|
||||
return pending.then(result => ({status: 'success', result}))
|
||||
.catch(err => ({status: 'error', result: err.message || String(err)}));
|
||||
return pending.then(result => ({success: true, result}))
|
||||
.catch(err => ({success: false, result: err.message || String(err)}));
|
||||
}
|
||||
|
||||
// Parse the source and find the duplication
|
||||
|
|
|
@ -4,7 +4,7 @@ function runtimeSend(request) {
|
|||
return new Promise((resolve, reject) => {
|
||||
chrome.runtime.sendMessage(
|
||||
request,
|
||||
({status, result}) => (status === 'error' ? reject : resolve)(result)
|
||||
({success, result}) => (success ? resolve : reject)(result)
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user