kontent-ai / kontent-ai-migration-toolkit

MIT License
2 stars 1 forks source link

Exported number elements of value 0 do not get correctly set #8

Closed nkooman-bzs closed 3 weeks ago

nkooman-bzs commented 1 month ago

Brief bug description

When a number element has a value of 0, the resulting value is set to undefined in the migration item.

Repro steps

  1. Export a content item that includes a number element with a value of 0
  2. See that the resulting item's number element does not have a value of 0
    • Note: the exported value will actually be missing entirely. #7 addresses this.

Expected behavior

The value field is set to 0

Test environment

N/A

Additional context

The fix is simple. This guard clause needs to updated to check nullish values instead of falsey ones.

Screenshots

N/A