fix: ensure $state.snapshot
never errors
#12445
Merged
$state.snapshot
never errors
#12445