Skip to content

Commit 117d645

Browse files
committed
Use ES5 syntax
Signed-off-by: Yuta Sato <[email protected]>
1 parent ae464d3 commit 117d645

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

jscomp/runtime/caml_splice_call.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ let spliceNewApply : obj -> obj -> obj = [%raw{|function (ctor,args){
4949
for(i = 0; i < lastOne.length; ++i ){
5050
applied.push(lastOne[i])
5151
}
52-
return new ctor(...applied)
52+
var C = Function.prototype.bind.apply(ctor, applied)
53+
return new C()
5354
}|}]
5455

5556
let spliceObjApply : obj -> obj -> obj -> obj = [%raw{|function(obj,name,args){

0 commit comments

Comments
 (0)