We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4825f10 commit b441d1bCopy full SHA for b441d1b
javascript/diff_match_patch_uncompressed.js
@@ -1340,11 +1340,19 @@ diff_match_patch.prototype.diff_levenshtein = function(diffs) {
1340
};
1341
1342
diff_match_patch.prototype.isHighSurrogate = function(c) {
1343
+ if(typeof c !== 'string'){
1344
+ return false
1345
+ }
1346
+
1347
var v = c.charCodeAt(0);
1348
return v >= 0xD800 && v <= 0xDBFF;
1349
}
1350
1351
diff_match_patch.prototype.isLowSurrogate = function(c) {
1352
1353
1354
1355
1356
1357
return v >= 0xDC00 && v <= 0xDFFF;
1358
0 commit comments