Skip to content

Commit

Permalink
Replace startsWith with indexOf - IE compatibility (#169)
Browse files Browse the repository at this point in the history
`startsWith` is not IE 11 compatible, `indexOf` gets the job done
  • Loading branch information
cvetanov authored and eli-darkly committed Jul 29, 2019
1 parent 47516a7 commit 8ce1e4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/launchdarkly-react-client-sdk/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const camelCaseKeys = (rawFlags: LDFlagSet) => {
const flags: LDFlagSet = {};
for (const rawFlag in rawFlags) {
// Exclude system keys
if (!rawFlag.startsWith('$')) {
if (rawFlag.indexOf('$') !== 0) {
const camelCasedKey = camelCase(rawFlag);
flags[camelCasedKey] = rawFlags[rawFlag];
}
Expand Down

0 comments on commit 8ce1e4f

Please sign in to comment.