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

IE debugger fixes #429

Merged
merged 7 commits into from
Feb 28, 2014
Merged

IE debugger fixes #429

merged 7 commits into from
Feb 28, 2014

Conversation

prashn64
Copy link
Contributor

Fixes two issues:

  1. IE8 and below throws an error when calling indexOf on an array, so make a dust shim for it ( dust-core.js errors in IE8 #418 )
  2. IE9 and below treats console.log as an object as an object instead of a function, so add a check for that, and if it's an object, call it directly

This is patching back to 2.1.x so please double check the commit history.

@prashn64 prashn64 mentioned this pull request Feb 27, 2014
@kate2753
Copy link
Contributor

Code changes look good. Makes sense to redefine dust.log after first call so we don't do "if not IE \ else" logic with every log.

Parent commits for 2.1.x, 2.2.x and 2.3.x look good as well.

jimmyhchan added a commit that referenced this pull request Feb 28, 2014
Patch 2.1.X 2.2.X 2.3.X to fix IE9 and below issues when dust debugging is on. Added a cross-browser/node/rhino version of indexOf and logger.log.
@jimmyhchan jimmyhchan merged commit aeddb4c into linkedin:master Feb 28, 2014
@kyletsang
Copy link

I believe there's an error in the indexInArray function.

for (;fromIndex < length; fromIndex++) {
      if (this[fromIndex] === item) {
        return fromIndex;
      }
    }

Shouldn't this[fromIndex] be arr[fromIndex]? See code below:

for (;fromIndex < length; fromIndex++) {
      if (arr[fromIndex] === item) {
        return fromIndex;
      }
    }

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

Successfully merging this pull request may close these issues.

4 participants