chore: ensure compat type definitions do not break existing types (#11741)
This commit is contained in:
1 parent
0f92afb4bd
commit
39c3ef0d94
8 files changed
+31
-12
No files matched your search
@@ -60,7 +60,7 @@ export function CreateButton(props: CreateBtnProps) {
|
||||
|
||||
// inject selection data into url for correct router history
|
||||
const openModal = (option: Option) => {
|
||||
const _searchParams = new URLSearchParams(searchParams);
|
||||
const _searchParams = new URLSearchParams(searchParams ?? undefined);
|
||||
function setParamsIfDefined(key: string, value: string | number | boolean | null | undefined) {
|
||||
if (value !== undefined && value !== null) _searchParams.set(key, value.toString());
|
||||
}
|
||||
@@ -136,7 +136,7 @@ export function CreateButton(props: CreateBtnProps) {
|
||||
</DropdownMenuContent>
|
||||
</Dropdown>
|
||||
)}
|
||||
{searchParams.get("dialog") === "new" && CreateDialog}
|
||||
{searchParams?.get("dialog") === "new" && CreateDialog}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user