diff options
author | Wu Cheng-Han | 2016-11-01 15:04:48 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-11-01 15:04:48 +0800 |
commit | 25fa5039810b6be9ebccef34f6af31617a616b65 (patch) | |
tree | c4211c9714e5b63ab7f6faee945d523fffd19dc2 | |
parent | ba2bfa2188afe7518eb394af02499069f6d997fb (diff) |
Fix viewAjaxCallback might be called on null
-rw-r--r-- | public/js/extra.js | 3 | ||||
-rw-r--r-- | public/js/slide.js | 2 | ||||
-rw-r--r-- | public/js/syncscroll.js | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/public/js/extra.js b/public/js/extra.js index 44a39052..01363886 100644 --- a/public/js/extra.js +++ b/public/js/extra.js @@ -204,8 +204,7 @@ function parseMeta(md, edit, view, toc, tocAffix) { } } -var viewAjaxCallback = null; -window.viewAjaxCallback = viewAjaxCallback; +window.viewAjaxCallback = null; //regex for extra tags var spaceregex = /\s*/; diff --git a/public/js/slide.js b/public/js/slide.js index c260de6d..16ea6b8f 100644 --- a/public/js/slide.js +++ b/public/js/slide.js @@ -97,7 +97,7 @@ var queryOptions = Reveal.getQueryHash() || {}; var options = extend(defaultOptions, options, queryOptions); Reveal.initialize(options); -viewAjaxCallback = function () { +window.viewAjaxCallback = function () { Reveal.layout(); }; diff --git a/public/js/syncscroll.js b/public/js/syncscroll.js index b2fee76c..47d0e1c4 100644 --- a/public/js/syncscroll.js +++ b/public/js/syncscroll.js @@ -138,7 +138,7 @@ function setupSyncAreas(edit, view, markdown) { var scrollMap, lineHeightMap, viewTop, viewBottom; -viewAjaxCallback = clearMap; +window.viewAjaxCallback = clearMap; function clearMap() { scrollMap = null; |