From 3eb64cff55fa3a9f88b67cddedb388c6fb02c6b8 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Fri, 15 Jan 2021 21:18:23 +0100 Subject: [PATCH] Delete slide options that are not defined Reveal.js doesn't set the default value of an option in the provided config object if the key is set with "undefined" as value. This leads to a broken slide mode, because some critical settings are missing. Signed-off-by: Tilman Vatteroth --- public/js/slide.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/js/slide.js b/public/js/slide.js index c78520210..e0e831cac 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -124,6 +124,12 @@ var options = { width: meta.slideOptions.width } || {} +for (const key in options) { + if (options.hasOwnProperty(key) && options[key] === undefined) { + delete options[key] + } +} + const view = $('.reveal') // text language