Fix the seemingly safe spellings found by codespell

Untested, only checked by inspection.

(cherry picked from commit 2c47a11008)
This commit is contained in:
Peter Newman
2020-06-28 23:06:44 +01:00
parent 248b29983d
commit 4205ca1d07
49 changed files with 87 additions and 87 deletions
+3 -3
View File
@@ -170,11 +170,11 @@ export function validationAlmostJunction(context) {
return false;
}
let occurences = 0;
let occurrences = 0;
for (const index in way.nodes) {
if (way.nodes[index] === node.id) {
occurences += 1;
if (occurences > 1) {
occurrences += 1;
if (occurrences > 1) {
return false;
}
}
+2 -2
View File
@@ -453,12 +453,12 @@ export function validationCrossingWays(context) {
} else if (context.graph().geometry(this.entityIds[0]) === 'line' &&
context.graph().geometry(this.entityIds[1]) === 'line') {
// don't recommend adding bridges to waterways since they're uncommmon
// don't recommend adding bridges to waterways since they're uncommon
if (allowsBridge(selectedFeatureType) && selectedFeatureType !== 'waterway') {
fixes.push(makeAddBridgeOrTunnelFix('add_a_bridge', 'temaki-bridge', 'bridge'));
}
// don't recommend adding tunnels under waterways since they're uncommmon
// don't recommend adding tunnels under waterways since they're uncommon
var skipTunnelFix = otherFeatureType === 'waterway' && selectedFeatureType !== 'waterway';
if (allowsTunnel(selectedFeatureType) && !skipTunnelFix) {
fixes.push(makeAddBridgeOrTunnelFix('add_a_tunnel', 'temaki-tunnel', 'tunnel'));
+3 -3
View File
@@ -46,11 +46,11 @@ export function validationImpossibleOneway() {
}
function nodeOccursMoreThanOnce(way, nodeID) {
var occurences = 0;
var occurrences = 0;
for (var index in way.nodes) {
if (way.nodes[index] === nodeID) {
occurences += 1;
if (occurences > 1) return true;
occurrences += 1;
if (occurrences > 1) return true;
}
}
return false;