Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console.log(1) blows up Internet Explorer Javascript #90

Open
SpectrumJobs opened this issue Feb 28, 2018 · 1 comment
Open

console.log(1) blows up Internet Explorer Javascript #90

SpectrumJobs opened this issue Feb 28, 2018 · 1 comment
Assignees
Labels

Comments

@SpectrumJobs
Copy link

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 IonDen self-assigned this Feb 28, 2018
@IonDen IonDen added the Bug label Feb 28, 2018
@IonDen
Copy link
Owner

IonDen commented Feb 28, 2018

Oh shit, this console.log should be removed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants