Word js api- parent content control throws exception if empty instead of returning null as per documentation

Vimal, thank you for your feedback! This behavior is by design and we will update our documentation to reflect this accurately.
We have started work to add another property that can return null. We’ll let you know when this is available,
Thanks!
Office Extensibility Team
1 comment
-
Anonymous commented
This is Microsoft Office word 2016 version issue. Same code working fine in 16.0.7571.7095. but not working other word 2016 version.
i have tried document.getSelection().parentContentControlOrNullObject but still getting error:Error:
Unable to get property '_objectPath' of undefined or null reference.