Rejecting the promise in a registerSave callback should automatically revert any changes to the option page.
This line assumes that the promises will always resolve:
|
const saveTriggerValue = await Trigger.runSaveTrigger(option, optionValue, event); |
It produces an "uncaught exception" error if they do not, which leaves the options page in an invalid state:

This is particularity an issue when using the PermissionRequest library.
The solution is probably for the library to call preventDefault() whenever the promise is rejected.
Rejecting the promise in a
registerSavecallback should automatically revert any changes to the option page.This line assumes that the promises will always resolve:
AutomaticSettings/internal/LoadAndSave.js
Line 54 in c88ded6
It produces an "uncaught exception" error if they do not, which leaves the options page in an invalid state:
This is particularity an issue when using the PermissionRequest library.
The solution is probably for the library to call
preventDefault()whenever the promise is rejected.