We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 73eeb4e commit b81dcb0Copy full SHA for b81dcb0
src/reconciler/utils.js
@@ -17,9 +17,13 @@ const getTypeOf = type => {
17
return 'Fragment'; // ?
18
};
19
20
+function clearStringFast(str) {
21
+ return str.length < 12 ? str : ` ${str}`.slice(1);
22
+}
23
+
24
const haveTextSimilarity = (a, b) =>
25
// equal or slight changed
- a === b || levenshtein.get(a, b) < a.length * 0.2;
26
+ a === b || levenshtein.get(clearStringFast(a), clearStringFast(b)) < a.length * 0.2;
27
28
const getBaseProto = source =>
29
source.prototype.hotComponentRender ? Object.getPrototypeOf(source.prototype) : source.prototype;
0 commit comments