From cfbc4879adbfbed2deb0a01a4682a180206a03f1 Mon Sep 17 00:00:00 2001 From: Dave Alverson Date: Fri, 19 Jun 2026 14:49:53 -0400 Subject: [PATCH] fix for default lock set at 1, creating places --- WMEPIE.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/WMEPIE.js b/WMEPIE.js index 60b021b..63d20c1 100644 --- a/WMEPIE.js +++ b/WMEPIE.js @@ -1,7 +1,7 @@ // ==UserScript== // @name WME Place Interface Enhancements // @namespace https://greasyfork.org/users/30701-justins83-waze -// @version 2026.06.09.01 +// @version 2026.06.19.01 // @description Enhancements to various Place interfaces // @include https://www.waze.com/editor* // @include https://www.waze.com/*/editor* @@ -50,7 +50,7 @@ let GLE; let navPointManager = null; var catalog = []; - const updateMessage = 'Updating to latest Hours Parser'; + const updateMessage = 'Minor fix for default lock level of 1.'; var lastSelectedFeature; const SCRIPT_VERSION = GM_info.script.version.toString(); const SCRIPT_NAME = GM_info.script.name; @@ -2519,7 +2519,10 @@ venueId: newPlaceId, }); } - sdk.DataModel.Venues.updateVenue({ venueId: newPlaceId, lockRank: Number(settings.DefaultLockLevel) }); + try { // setting lock to value its already at causes error, so catch error here and ignore. + sdk.DataModel.Venues.updateVenue({ venueId: newPlaceId, lockRank: Number(settings.DefaultLockLevel) }); + } catch (e) {} + const searchPoint = turf.centroid(geometry).geometry; // The Skip PLR & Skip Unnamed PR settings were merged. Passing SkipPLR for both. I did not change the function in case they are split in the future.