-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adaptModel.findAncestor triggers an error if no ancestor of that type exists #2240
Comments
Adding in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Subject of the issue/enhancement/features
If you do a findAncestor search on a contentObject to see if it has a contentObject as its ancestor - and it doesn't - an error is thrown.
(Kineo's pageIncompletePrompt extension does this to check to see if learner is being routed to a child page of the current page)
Your environment
Any
Steps to reproduce
Execute the following in the console:
Expected behaviour
no error should occur, the function should simply return
undefined
to indicate that no results were foundActual behaviour
The error 'TypeError: returnedAncestor is undefined' is thrown.
The text was updated successfully, but these errors were encountered: