Skip to content

Commit

Permalink
Reverted test change; Added strict null and undefined checks as a test
Browse files Browse the repository at this point in the history
  • Loading branch information
basicx-StrgV committed Jan 16, 2024
1 parent 5d5128b commit 4f8b2ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/doxygen-custom-page-injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
document.addEventListener("DOMContentLoaded", () => {
// Get the injection wrapper element and nav to value
let injectionWrapper = document.getElementById("injection-wrapper");
var navToValue = injectionWrapper.getAttribute("nav-to");
let navToValue = injectionWrapper.getAttribute("nav-to");

// Exit if there is no injection wrapper element and display error message
if (injectionWrapper == null) {
Expand Down Expand Up @@ -41,7 +41,7 @@ document.addEventListener("DOMContentLoaded", () => {
// Proceed if the new document is loaded
document.addEventListener("DOMContentLoaded", () => {
// Check if a value for nav to is provided
if (navToValue != null && navTo != null) {
if (navToValue !== undefined && navToValue !== null && navTo !== undefined && navTo !== null) {
// Wrap the original navTo function from doxygen into custom function
let originalNavToFunc = navTo;
navTo = (o, root, hash, relpath) => {
Expand Down
4 changes: 2 additions & 2 deletions doxygen/js/doxygen-custom-page-injector.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
document.addEventListener("DOMContentLoaded", () => {
// Get the injection wrapper element and nav to value
let injectionWrapper = document.getElementById("injection-wrapper");
var navToValue = injectionWrapper.getAttribute("nav-to");
let navToValue = injectionWrapper.getAttribute("nav-to");

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

0 comments on commit 4f8b2ba

Please sign in to comment.