Skip to content

Commit 209ff88

Browse files
committed
Updated get_global implementation. removed Set javascript test
1 parent 381bdeb commit 209ff88

File tree

2 files changed

+3
-107
lines changed

2 files changed

+3
-107
lines changed

src/javascript/lib/core/functions.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,13 @@ function reverse(list){
188188
function get_global(){
189189
if(typeof(self) !== "undefined"){
190190
return self;
191+
}else if(typeof(window) !== "undefined"){
192+
return window;
191193
}else if(typeof(global) !== "undefined"){
192194
return global;
193195
}
194196

195-
throw "No global state found";
197+
throw new Error("No global state found");
196198
}
197199

198200
function concat_lists(left, right){

src/javascript/tests/set.spec.js

Lines changed: 0 additions & 106 deletions
This file was deleted.

0 commit comments

Comments
 (0)