* @class mw.Uri
*/
-/* eslint-disable no-use-before-define */
-
( function ( mw, $ ) {
var parser, properties;
return uri;
}
href = hrefCur;
+ // eslint-disable-next-line no-use-before-define
uri = new Uri( href );
return uri;
};
// Copy data over from existing URI object
for ( prop in uri ) {
// Only copy direct properties, not inherited ones
- if ( uri.hasOwnProperty( prop ) ) {
+ if ( Object.prototype.hasOwnProperty.call( uri, prop ) ) {
// Deep copy object properties
if ( Array.isArray( uri[ prop ] ) || $.isPlainObject( uri[ prop ] ) ) {
this[ prop ] = $.extend( true, {}, uri[ prop ] );