diff --git a/src/utils/useAtomsDevtools.ts b/src/utils/useAtomsDevtools.ts index 1660c658..193b171a 100644 --- a/src/utils/useAtomsDevtools.ts +++ b/src/utils/useAtomsDevtools.ts @@ -9,7 +9,9 @@ import { SnapshotOptions, useAtomsSnapshot } from './useAtomsSnapshot'; import { useGotoAtomsSnapshot } from './useGotoAtomsSnapshot'; const atomToPrintable = (atom: AnyAtom) => - atom.debugLabel ? `${atom}:${atom.debugLabel}` : `${atom}`; + atom.debugLabel && !String(atom).includes(':') + ? `${atom}:${atom.debugLabel}` + : `${atom}`; const getDevtoolsState = (atomsSnapshot: AtomsSnapshot) => { const values: Record = {};