From 443a4a82c1954bd9265ada79f89cb7121862e0c7 Mon Sep 17 00:00:00 2001 From: Henrik Ingo Date: Mon, 30 Oct 2017 19:16:55 +0200 Subject: [PATCH] Fix goto plugin: set lib variable from impress:init --- js/impress.js | 4 ++++ src/plugins/goto/goto.js | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/js/impress.js b/js/impress.js index 4449278..a600af6 100644 --- a/js/impress.js +++ b/js/impress.js @@ -1659,6 +1659,10 @@ "use strict"; var lib; + document.addEventListener( "impress:init", function( event ) { + lib = event.detail.api.lib; + }, false ); + var isNumber = function( numeric ) { return !isNaN( numeric ); }; diff --git a/src/plugins/goto/goto.js b/src/plugins/goto/goto.js index cfac544..ac77d95 100644 --- a/src/plugins/goto/goto.js +++ b/src/plugins/goto/goto.js @@ -32,6 +32,10 @@ "use strict"; var lib; + document.addEventListener( "impress:init", function( event ) { + lib = event.detail.api.lib; + }, false ); + var isNumber = function( numeric ) { return !isNaN( numeric ); };