Sanity Library Reference Docs
    Preparing search index...

    Function isDraftVersion

    • Beta

      Uses the _system field to check if a version is a draft version.

      By default, any draft variant will match. Use the constraint options to limit matching to the base variant, or to a particular variant id.

      Parameters

      • version: VersionInfoDocumentStub
      • options: { constraint: VariantConstraint } = ...

      Returns boolean