Fix a typo: occurences -> occurrences (#5575)
This commit is contained in:
parent
b3c7337fac
commit
9b4c33d44e
@ -99,7 +99,7 @@ function findCommonStringDelimiter(code, tokens) {
|
||||
return DEFAULT_STRING_DELIMITER;
|
||||
}
|
||||
|
||||
const occurences = {
|
||||
const occurrences = {
|
||||
single: 0,
|
||||
double: 0
|
||||
};
|
||||
@ -112,15 +112,15 @@ function findCommonStringDelimiter(code, tokens) {
|
||||
|
||||
const raw = code.slice(token.start, token.end);
|
||||
if (raw[0] === "'") {
|
||||
occurences.single++;
|
||||
occurrences.single++;
|
||||
} else {
|
||||
occurences.double++;
|
||||
occurrences.double++;
|
||||
}
|
||||
|
||||
checked++;
|
||||
if (checked >= 3) break;
|
||||
}
|
||||
if (occurences.single > occurences.double) {
|
||||
if (occurrences.single > occurrences.double) {
|
||||
return "single";
|
||||
} else {
|
||||
return "double";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user