mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-04 05:58:09 +02:00
Fix the seemingly safe spellings found by codespell
Untested, only checked by inspection.
(cherry picked from commit 2c47a11008)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'));
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user