From e7567e4d67926f0b5e5c703f5e526b55752a987e Mon Sep 17 00:00:00 2001 From: quenousimporte Date: Thu, 8 Feb 2024 09:07:24 +0100 Subject: [PATCH] refactor guid from title --- main.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/main.js b/main.js index 61599e0..9012104 100644 --- a/main.js +++ b/main.js @@ -1117,15 +1117,7 @@ function remotecallfailed(error) function getguid(title) { - var guid = null; - foreachmetadata( (g,i) => - { - if (i.title == title) - { - guid = g; - } - }); - return guid; + return Object.keys(metadata).find(guid => metadata[guid].title === title); } function gotoline(line)