Skip to content

Commit 4f8b2ba

Browse files
committed
Reverted test change; Added strict null and undefined checks as a test
1 parent 5d5128b commit 4f8b2ba

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/doxygen-custom-page-injector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
document.addEventListener("DOMContentLoaded", () => {
88
// Get the injection wrapper element and nav to value
99
let injectionWrapper = document.getElementById("injection-wrapper");
10-
var navToValue = injectionWrapper.getAttribute("nav-to");
10+
let navToValue = injectionWrapper.getAttribute("nav-to");
1111

1212
// Exit if there is no injection wrapper element and display error message
1313
if (injectionWrapper == null) {
@@ -41,7 +41,7 @@ document.addEventListener("DOMContentLoaded", () => {
4141
// Proceed if the new document is loaded
4242
document.addEventListener("DOMContentLoaded", () => {
4343
// Check if a value for nav to is provided
44-
if (navToValue != null && navTo != null) {
44+
if (navToValue !== undefined && navToValue !== null && navTo !== undefined && navTo !== null) {
4545
// Wrap the original navTo function from doxygen into custom function
4646
let originalNavToFunc = navTo;
4747
navTo = (o, root, hash, relpath) => {

doxygen/js/doxygen-custom-page-injector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
document.addEventListener("DOMContentLoaded", () => {
88
// Get the injection wrapper element and nav to value
99
let injectionWrapper = document.getElementById("injection-wrapper");
10-
var navToValue = injectionWrapper.getAttribute("nav-to");
10+
let navToValue = injectionWrapper.getAttribute("nav-to");
1111

1212
// Exit if there is no injection wrapper element and display error message
1313
if (injectionWrapper == null) {
@@ -41,7 +41,7 @@ document.addEventListener("DOMContentLoaded", () => {
4141
// Proceed if the new document is loaded
4242
document.addEventListener("DOMContentLoaded", () => {
4343
// Check if a value for nav to is provided
44-
if (navToValue != null && navTo != null) {
44+
if (navToValue !== undefined && navToValue !== null && navTo !== undefined && navTo !== null) {
4545
// Wrap the original navTo function from doxygen into custom function
4646
let originalNavToFunc = navTo;
4747
navTo = (o, root, hash, relpath) => {

0 commit comments

Comments
 (0)