Merge "Fix MultiHttpClient to return correct errors"
[lhc/web/wiklou.git] / resources / src / mediawiki / mediawiki.Uri.js
index abfb279..07d8900 100644 (file)
                                        this.port = defaultUri.port;
                                }
                        }
-                       if ( this.path && this.path.charAt( 0 ) !== '/' ) {
+                       if ( this.path && this.path[0] !== '/' ) {
                                // A real relative URL, relative to defaultUri.path. We can't really handle that since we cannot
                                // figure out whether the last path component of defaultUri.path is a directory or a file.
                                throw new Error( 'Bad constructor arguments' );