mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 23:08:39 +09:00
Return an empty set if getting recipes for host fails.
This avoids errors when _recipeManager is not (yet) available. This resolves #496.
This commit is contained in:
parent
2999a8e031
commit
0298125fa6
1 changed files with 7 additions and 2 deletions
|
|
@ -102,8 +102,13 @@ var LoginManagerParent = {
|
|||
}
|
||||
|
||||
case "RemoteLogins:findRecipes": {
|
||||
let formHost = (new URL(data.formOrigin)).host;
|
||||
return this._recipeManager.getRecipesForHost(formHost);
|
||||
try {
|
||||
let formHost = (new URL(data.formOrigin)).host;
|
||||
return this._recipeManager.getRecipesForHost(formHost);
|
||||
} catch(e) {
|
||||
// Just return an empty set in case of error.
|
||||
return new Set();
|
||||
}
|
||||
}
|
||||
|
||||
case "RemoteLogins:onFormSubmit": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue