Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Commit

Permalink
Removed Hangul checks in shims which crashes Android (ethers-io#1519).
Browse files Browse the repository at this point in the history
  • Loading branch information
ricmoo authored and pull[bot] committed Jun 4, 2021
1 parent ab71ae7 commit a72d291
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions packages/shims/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@
throw new Error("failed to normalize");
}

// @TODO: Must find a better way to detect completely
// broken normalize implementations. On some versions
// of Android, the following causes the entire app
// to abort. Might want to add "check if normalizing
// is necessary" to Wordlist; if the entire string is
// from CJK planes, no need to call normalize?
//
// Some platforms seem to only fail when normalizing
// specific code planes, so add those here as they
// come up.
// "hangul"
const checks = [ "\ud55c\uae00" ];
for (var j = 0; j < checks.length; j++) {
checks[j].normalize(forms[i]);
}
//const checks = [ "\ud55c\uae00" ];
//for (var j = 0; j < checks.length; j++) {
// checks[j].normalize(forms[i]);
//}
} catch(error) {
missing.push(forms[i]);
}
Expand Down

0 comments on commit a72d291

Please sign in to comment.