You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding in if (!returnedAncestor) return;here would solve the immediate issue, but looking at the code following that the behaviour looks a bit odd, not sure why this would just return the original item's grandparent regardless of what type it is? Code seems to be making assumptions about the structure of the course that aren't necessarily correct...
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: