File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -1340,11 +1340,19 @@ diff_match_patch.prototype.diff_levenshtein = function(diffs) {
13401340} ;
13411341
13421342diff_match_patch . prototype . isHighSurrogate = function ( c ) {
1343+ if ( typeof c !== 'string' ) {
1344+ return false
1345+ }
1346+
13431347 var v = c . charCodeAt ( 0 ) ;
13441348 return v >= 0xD800 && v <= 0xDBFF ;
13451349}
13461350
13471351diff_match_patch . prototype . isLowSurrogate = function ( c ) {
1352+ if ( typeof c !== 'string' ) {
1353+ return false
1354+ }
1355+
13481356 var v = c . charCodeAt ( 0 ) ;
13491357 return v >= 0xDC00 && v <= 0xDFFF ;
13501358}
Original file line number Diff line number Diff line change 11{
22 "name" : " diff-match-patch" ,
3- "version" : " 1.0.2 " ,
3+ "version" : " 1.0.3 " ,
44 "description" : " diff-patch-match fork with fixed surrogate pair processing" ,
55 "main" : " diff_match_patch_uncompressed.js" ,
66 "directories" : {
You can’t perform that action at this time.
0 commit comments