diff --git a/lib/zin/wg/docapp/js/v1.js b/lib/zin/wg/docapp/js/v1.js index 15233567d4..af98395867 100644 --- a/lib/zin/wg/docapp/js/v1.js +++ b/lib/zin/wg/docapp/js/v1.js @@ -312,6 +312,8 @@ function postLastViewedToServer(location) */ function handleSwitchView(mode, location, info) { + if(!this.element || this.element.closest('.modal')) return; + const rawModule = config.rawModule.toLowerCase(); const rawMethod = config.rawMethod.toLowerCase(); const formatUrl = this.props.viewModeUrl;