Skip to content

Commit 6decf56

Browse files
committed
feat: force globalSet
1 parent 4bc3d9c commit 6decf56

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

changelog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# UnderScript Changelog
22

3+
## Version 0.63.6 (2025-08-15)
4+
1. Minor bug fixes
5+
36
## Version 0.63.5 (2025-08-01)
47
1. Added `underscript.item`
58
1. Added `underscript.priority`

src/utils/global.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ export function global(...key) {
1616
}
1717

1818
export function globalSet(key, value, {
19+
force = false,
1920
throws = true,
2021
} = {}) {
21-
if (!hasOwn(window, key)) {
22+
if (!force && !hasOwn(window, key)) {
2223
const msg = `[${key}] does not exist`;
2324
if (throws) throw new Error(msg);
2425
return debug(msg);

0 commit comments

Comments
 (0)