fix sonarqube findings
This commit is contained in:
@@ -409,8 +409,8 @@ globalThis.Wegwichtel = globalThis.Wegwichtel || {};
|
||||
}
|
||||
|
||||
function appendPosition(document, position, routeName) {
|
||||
const lat = position.lat == null ? NaN : Number(position.lat);
|
||||
const lon = position.lon == null ? NaN : Number(position.lon);
|
||||
const lat = position.lat == null ? Number.NaN : Number(position.lat);
|
||||
const lon = position.lon == null ? Number.NaN : Number(position.lon);
|
||||
const timestamp = new Date(position.timestamp ?? Date.now()).toISOString();
|
||||
if (!Number.isFinite(lat) || !Number.isFinite(lon) || Math.abs(lat) > 90 || Math.abs(lon) > 180) {
|
||||
const root = document.documentElement;
|
||||
|
||||
Reference in New Issue
Block a user