Fix internal CFI nav logic function
Return null instead of an array with an empty object. This is to match the behaviour before the recent refactoring
MODIFY
js/views/cfi_navigation_logic.js
js/views/cfi_navigation_logic.js
@@ -1689,6 +1689,9 @@ var CfiNavigationLogic = function (options) {
}
}
+ if (!firstVisibleElement) {
+ return null;
+ }
return {
element: firstVisibleElement,
textNode: textNode,
@@ -1770,6 +1773,9 @@ var CfiNavigationLogic = function (options) {
}
} while (treeWalker.previousNode());
+ if (!firstVisibleElement) {
+ return null;
+ }
return {
element: firstVisibleElement,
textNode: textNode,

Fix internal CFI nav logic function

Return null instead of an array with an empty object. This is to match the behaviour before the recent refactoring