Versioning on a new global with no past saved versions will throw an error

default discord avatar
sesons
7 months ago
4

Hello fellas,



It appears that I'm unable to save/publish anything to a new global if there isn't already a saved/published version of that global in the DB when versioning is enabled.



Payload will throw

TypeError: Cannot convert undefined or null to object


I was able to remedy this by disabling versioning, saving/publishing changes such that there is one published version of the doc saved in the DB, then re-enabling versioning, which after this point no longer throws an error



Is someone able to corroborate that this happens to them too?

  • default discord avatar
    bobbyZ
    6 months ago

    yeah happening here too at 1.6.15

  • discord user avatar
    dribbens
    Payload Team
    6 months ago

    I was able to recreate this, I'm opening a new issue on Github and will be patching it today.



    I have a PR open, we'll do some merging and get a release out sometime this week.

  • default discord avatar
    sesons
    6 months ago

    thanks Dan

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.