Problem Description
GM.getValue returns undefined instead of Promise if no value is found in Firefox
Reproduction Steps
Create this script in Firefox version
// ==UserScript==
// @name GM.value bug
// @version 0.1.0
// @match https://www.openstreetmap.org/*
// @grant GM.getValue
// @grant GM.setValue
// ==/UserScript==
GM.getValue("test", 123).then(x => console.log(x))
Error:
Uncaught (in promise) TypeError: GM.getValue(...).then is not a function
This works correctly in Tampermonkey and ViolentMonkey. It also works in Chrome. The bug only occurs in Firefox.
ScriptCat Version
v0.16.13
Operating System and Browser Information
Firefox 151.0b7, macOS
Additional Information (Optional)
No response
Problem Description
GM.getValuereturnsundefinedinstead of Promise if no value is found in FirefoxReproduction Steps
Create this script in Firefox version
Error:
Uncaught (in promise) TypeError: GM.getValue(...).then is not a functionThis works correctly in Tampermonkey and ViolentMonkey. It also works in Chrome. The bug only occurs in Firefox.
ScriptCat Version
v0.16.13
Operating System and Browser Information
Firefox 151.0b7, macOS
Additional Information (Optional)
No response