diff --git a/packages/toolpad-app/src/appDom.ts b/packages/toolpad-app/src/appDom.ts index 70689a412e6..f2ccf9c928b 100644 --- a/packages/toolpad-app/src/appDom.ts +++ b/packages/toolpad-app/src/appDom.ts @@ -822,6 +822,13 @@ export function deref(nodeRef: NodeReference): NodeId; export function deref(nodeRef: null | undefined): null; export function deref(nodeRef: Maybe): NodeId | null; export function deref(nodeRef: Maybe): NodeId | null { + if (typeof nodeRef === 'string') { + // This branch provides backwards compatibility for old style string refs + // TODO: remove this branch and replace with a migration after the functionality is in place . + // See https://github.com/mui/mui-toolpad/pull/776 + // In migration '1' we should update all query connectionId and navigate action pageId. + return nodeRef; + } if (nodeRef) { return nodeRef.$$ref; }