post.capabilities.items will still be defined because it’s an empty array, if you check post.capabilities.items.length it should work fine because 0 is falsy.
post.capabilities.items will still be defined because it’s an empty array, if you check post.capabilities.items.length it should work fine because 0 is falsy.