I think you can check runtime.dryRun() to see if your in a preview
h
I think you can check runtime.dryRun() to see if your in a preview