Skip to content

Commit 801b252

Browse files
nonisolated(unsafe) is available only in Swift 5.10 and later
1 parent 9117971 commit 801b252

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/JavaScriptKit/FundamentalObjects/JSObject.swift

+2
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ public class JSObject: Equatable {
141141

142142
// `JSObject` storage itself is immutable, and use of `JSObject.global` from other
143143
// threads maintains the same semantics as `globalThis` in JavaScript.
144+
#if compiler(>=5.10)
144145
nonisolated(unsafe)
146+
#endif
145147
static let _global = JSObject(id: _JS_Predef_Value_Global)
146148
#else
147149
static let _global = JSObject(id: _JS_Predef_Value_Global)

0 commit comments

Comments
 (0)