From 8f744e7d0d1a8763773e08341a20e6cccfe1cc7b Mon Sep 17 00:00:00 2001 From: Cameron Yick Date: Thu, 20 Apr 2023 00:56:53 -0400 Subject: [PATCH] prf: prefer has() to get() for set membership --- datasette/static/datasette-manager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasette/static/datasette-manager.js b/datasette/static/datasette-manager.js index d8160ac371..f650959dcb 100644 --- a/datasette/static/datasette-manager.js +++ b/datasette/static/datasette-manager.js @@ -41,7 +41,7 @@ const datasetteManager = { plugins: new Map(), registerPlugin: (name, pluginMetadata) => { - if (datasetteManager.plugins.get(name)) { + if (datasetteManager.plugins.has(name)) { console.warn(`Warning -> plugin ${name} was redefined`); } datasetteManager.plugins.set(name, pluginMetadata);