diff --git a/packages/desktop-client/src/components/modals/ManageRulesModal.tsx b/packages/desktop-client/src/components/modals/ManageRulesModal.tsx index fcd72db22b..006c6df964 100644 --- a/packages/desktop-client/src/components/modals/ManageRulesModal.tsx +++ b/packages/desktop-client/src/components/modals/ManageRulesModal.tsx @@ -1,9 +1,6 @@ // @ts-strict-ignore import React, { useState } from 'react'; import { useTranslation } from 'react-i18next'; -import { useLocation } from 'react-router'; - -import { isNonProductionEnvironment } from 'loot-core/shared/environment'; import { Modal, @@ -21,14 +18,6 @@ type ManageRulesModalProps = Extract< export function ManageRulesModal({ payeeId }: ManageRulesModalProps) { const { t } = useTranslation(); const [loading, setLoading] = useState(true); - const location = useLocation(); - if (isNonProductionEnvironment()) { - if (location.pathname !== '/payees') { - throw new Error( - `Possibly invalid use of ManageRulesModal, add the current url \`${location.pathname}\` to the allowlist if you're confident the modal can never appear on top of the \`/rules\` page.`, - ); - } - } return ( diff --git a/upcoming-release-notes/6625.md b/upcoming-release-notes/6625.md new file mode 100644 index 0000000000..43eecc34e1 --- /dev/null +++ b/upcoming-release-notes/6625.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [RMcGhee] +--- + +Remove url check that throws error in development