From c2f08b3659f13feb360c928bd11ff7addbb30605 Mon Sep 17 00:00:00 2001 From: panreyes Date: Mon, 5 Jun 2023 02:17:56 +0200 Subject: [PATCH] Fix issue with Algolia's docsearch object being missing in pages with tabs Fixes https://github.com/godotengine/godot-docs/issues/7469 --- _static/js/algolia.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/_static/js/algolia.js b/_static/js/algolia.js index 55697a2ba37..bcf15f2360a 100644 --- a/_static/js/algolia.js +++ b/_static/js/algolia.js @@ -3,6 +3,11 @@ var doc_version = document.querySelector('meta[name="doc_version"]').getAttribute('content'); + // If the current page uses tabs, we will need this small patch + if (typeof(docsearch) == 'undefined') { + docsearch = exports['docsearch']; + } + // Initialize the Algolia search widget docsearch({ apiKey: 'c39cb614363a2a156811478bc2d0573b',