Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
Don't use Object.prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
sophstad committed Sep 15, 2023
1 parent c7d9322 commit cbddd28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/distroSettings/SaveModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ export const SaveModal: React.FC<SaveModalProps> = ({

const handleSave = () => {
// Only perform the save operation if the tab is valid.
if (Object.prototype.hasOwnProperty.call(formToGqlMap, tab)) {
// eslint-disable-next-line no-prototype-builtins
if (formToGqlMap.hasOwnProperty(tab)) {
const formToGql: FormToGqlFunction<typeof tab> = formToGqlMap[tab];
const changes = formToGql(formData, distro);
saveDistro({
Expand Down

0 comments on commit cbddd28

Please sign in to comment.