Skip to content
This repository has been archived by the owner on Feb 26, 2022. It is now read-only.

Commit

Permalink
Fix invalid method syntax used in URL constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
evilpie committed May 17, 2015
1 parent 8009a5a commit 0bbbd5e
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions lib/sdk/url.js
Expand Up @@ -152,20 +152,28 @@ function URL(url, base) {

Object.defineProperties(this, {
toString: {
value() new String(uri.spec).toString(),
value() {
return new String(uri.spec).toString();
},
enumerable: false
},
valueOf: {
value() new String(uri.spec).valueOf(),
value() {
return new String(uri.spec).valueOf();
},
enumerable: false
},
toSource: {
value() new String(uri.spec).toSource(),
value() {
return new String(uri.spec).toSource();
},
enumerable: false
},
// makes more sense to flatten to string, easier to travel across JSON
toJSON: {
value() new String(uri.spec).toString(),
value() {
return new String(uri.spec).toString();
},
enumerable: false
}
});
Expand Down

0 comments on commit 0bbbd5e

Please sign in to comment.