Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1422

shindig.uri.ext's resolve() doesn't work on IE 6/7

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Javascript
    • None

    Description

      Array-based accessors to strings don't work in IE 6/7. So the statement "selfPath[0]" returns "undefined". Need to use charAt() instead.

      Also, seems like a call to substring() was missing.

      diff --git a/features/src/main/javascript/features/shindig.uri.ext/util.js b/features/src/
      index 5c64e12..c274ad6 100644
      — a/features/src/main/javascript/features/shindig.uri.ext/util.js
      +++ b/features/src/main/javascript/features/shindig.uri.ext/util.js
      @@ -52,11 +52,11 @@ shindig.uri = (function()

      { self.setAuthority(base.getAuthority()); }

      var selfPath = self.getPath();

      • if (selfPath == '' || selfPath[0] != '/') {
        + if (selfPath == '' || selfPath.charAt(0) != '/')
        Unknown macro: { var basePath = base.getPath(); var lastSlash = basePath.lastIndexOf('/'); if (lastSlash != -1) { - basePath = basePath(0, lastSlash + 1); + basePath = basePath.substring(0, lastSlash + 1); } self.setPath(base.getPath() + selfPath); }

      Attachments

        Activity

          People

            Unassigned Unassigned
            jhpedemonte Javier Pedemonte
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: