Skip to content

Commit

Permalink
Add "/" to isduplicate function.
Browse files Browse the repository at this point in the history
  • Loading branch information
durulkoca committed May 15, 2024
1 parent 2950d96 commit e55c495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/APIDialog/APIDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ function APIDialog() {
const isValidChars = allowedChars.test(path);

const isDuplicate = contextApis.some(
(api) => api.path === path && api.method === methodRef.current
(api) => api.path === `/${path}` && api.method === methodRef.current
);

if (action === "edit") {
Expand Down

0 comments on commit e55c495

Please sign in to comment.