console.log(1) blows up Internet Explorer Javascript
SpectrumJobs opened this issue · 1 comments
SpectrumJobs commented
In the scenario where ion.sound is used from the "onclick" handler of a , ion.sound will blow up
in Internet Explorer's javascript processing when the code "console.log(1);" is hit, unless the F12/Developer Tools window is open, because the "console" is undefined.
That code is within ion.sound.js, within the "play" function, at line 766 (see code snippet below.)
play: function (options) {
if (!this.inited) {
return;
}
delete this.options.part;
if (options) {
extend(options, this.options);
}
console.log(1);
if (!this.loaded) {
Adding a function similar to:
var log = function (text) {
if(window.console) {
if(console.log && typeof console.log === "function") {
console.log(text);
}
}
}
... and replacing the "console.log(1)" with "log(1)" gets around the problem.
IonDen commented
Oh shit, this console.log should be removed!