When adding a navigation node, the option location is optional. However, when we are not mentioning a parentNodeId, the error message being returned to the user is: Error: undefined is not a valid value for the location option. Allowed values are QuickLaunch|TopNavigationBar. It might be better to add a more clearer description like:
'Location is required when not specifying a parentNodeId. The allowed values are QuickLaunch or TopNavigationBar'
Also it might be handy if we mention in the documentation file to specify either parentNodeId or location and also include the options in the initOptionSets method so that an error is thrown when both of the options are not used.
When adding a navigation node, the option
locationis optional. However, when we are not mentioning aparentNodeId, the error message being returned to the user is:Error: undefined is not a valid value for the location option. Allowed values are QuickLaunch|TopNavigationBar. It might be better to add a more clearer description like:'Location is required when not specifying a parentNodeId. The allowed values are QuickLaunch or TopNavigationBar'
Also it might be handy if we mention in the documentation file to specify either
parentNodeIdorlocationand also include the options in theinitOptionSetsmethod so that an error is thrown when both of the options are not used.