Skip to content

Commit

Permalink
fix(@formatjs/icu-messageformat-parser): improved hasNativeStartsWith…
Browse files Browse the repository at this point in the history
… check (#4130)
  • Loading branch information
apolakipso committed Jul 16, 2023
1 parent 61bb35e commit 75d60b5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/icu-messageformat-parser/parser.ts
Expand Up @@ -79,7 +79,8 @@ function createLocation(start: Position, end: Position): Location {

// #region Ponyfills
// Consolidate these variables up top for easier toggling during debugging
const hasNativeStartsWith = !!String.prototype.startsWith
const hasNativeStartsWith =
!!String.prototype.startsWith && '_a'.startsWith('a', 1)
const hasNativeFromCodePoint = !!String.fromCodePoint
const hasNativeFromEntries = !!(Object as any).fromEntries
const hasNativeCodePointAt = !!String.prototype.codePointAt
Expand Down

0 comments on commit 75d60b5

Please sign in to comment.