File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Sources/JavaScriptKit/FundamentalObjects Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -206,12 +206,14 @@ public class JSObject: Equatable {
206206 /// This allows access to the global properties and global names by accessing the `JSObject` returned.
207207 public static var global : JSObject { return _global }
208208
209- // `JSObject` storage itself is immutable, and use of `JSObject.global` from other
210- // threads maintains the same semantics as `globalThis` in JavaScript.
209+ #if compiler(>=5.10)
211210 @LazyThreadLocal ( initialize: {
212211 return JSObject ( id: _JS_Predef_Value_Global)
213212 } )
214213 private static var _global : JSObject
214+ #else
215+ private static let _global = JSObject ( id: _JS_Predef_Value_Global)
216+ #endif
215217
216218 deinit {
217219 assertOnOwnerThread ( hint: " deinitializing " )
You can’t perform that action at this time.
0 commit comments