Skip to content

[BUG] ScriptCat + Firefox: TypeError: can't access property "then", GM.getValue(...) is undefined #1436

@deevroman

Description

@deevroman

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

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions