Skip to content

Commit

Permalink
fix URL parse feature detection
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed May 6, 2024
1 parent f0ff250 commit ed25984
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
@@ -1,5 +1,6 @@
## Changelog
##### Unreleased
- Fixed `URL.parse` feature detection
- Compat data improvements:
- [`Set` methods proposal](https://github.com/tc39/proposal-set-methods) added and marked as [supported from FF 127](https://bugzilla.mozilla.org/show_bug.cgi?id=1868423)
- [`Symbol.dispose`](https://github.com/tc39/proposal-explicit-resource-management) added and marked as supported from V8 ~ Chromium 125
Expand Down
3 changes: 2 additions & 1 deletion packages/core-js/modules/web.url.parse.js
Expand Up @@ -3,12 +3,13 @@ var $ = require('../internals/export');
var getBuiltIn = require('../internals/get-built-in');
var validateArgumentsLength = require('../internals/validate-arguments-length');
var toString = require('../internals/to-string');
var USE_NATIVE_URL = require('../internals/url-constructor-detection');

var URL = getBuiltIn('URL');

// `URL.parse` method
// https://url.spec.whatwg.org/#dom-url-canparse
$({ target: 'URL', stat: true }, {
$({ target: 'URL', stat: true, forced: !USE_NATIVE_URL }, {
parse: function parse(url) {
var length = validateArgumentsLength(arguments.length, 1);
var urlString = toString(url);
Expand Down

0 comments on commit ed25984

Please sign in to comment.