Skip to content

Commit 01ff1ca

Browse files
Throws custom error when instantiating Tuna in node without context
1 parent efcbbfd commit 01ff1ca

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

tuna.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@
132132
if (!(this instanceof Tuna)) {
133133
return new Tuna(context);
134134
}
135+
136+
var window = window || {};
137+
135138
if (!window.AudioContext) {
136139
window.AudioContext = window.webkitAudioContext;
137140
}

0 commit comments

Comments
 (0)