Fix a typo: occurences -> occurrences (#5575)

This commit is contained in:
Felix Yan 2017-04-04 13:38:12 +08:00 committed by Aaron Ang
parent b3c7337fac
commit 9b4c33d44e

View File

@ -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";