Skip to content

Commit 5e64876

Browse files
committed
Support console.log/error with non-array arguments
1 parent 87fadcf commit 5e64876

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/ace/worker/worker.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,12 @@
22

33
var console = {
44
log: function(msgs) {
5-
postMessage({type: "log", data: arguments.join(" ")});
5+
msgs = Array.prototype.slice.call(arguments, 0);
6+
postMessage({type: "log", data: msgs});
7+
},
8+
error: function(msgs) {
9+
msgs = Array.prototype.slice.call(arguments, 0);
10+
postMessage({type: "log", data: msgs});
611
}
712
};
813
var window = {

0 commit comments

Comments
 (0)