Bug/1617 rules modal error (#6625)

* Remove error thrown and nonprod check

* Formatting

* Added release notes

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
RMcGhee
2026-01-11 16:11:08 -06:00
committed by GitHub
parent 0e20e17fa4
commit 073725e270
2 changed files with 6 additions and 11 deletions

View File

@@ -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 (
<Modal name="manage-rules" isLoading={loading}>

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [RMcGhee]
---
Remove url check that throws error in development