Skip to content

Commit

Permalink
prf: prefer has() to get() for set membership
Browse files Browse the repository at this point in the history
  • Loading branch information
hydrosquall committed Apr 20, 2023
1 parent 37d7e3f commit 8f744e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datasette/static/datasette-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8f744e7

Please sign in to comment.