misc(v2): misc fixes

This commit is contained in:
Yangshun Tay 2019-06-10 22:20:12 -07:00
parent ccff6ed71f
commit 2d7a456208
2 changed files with 5 additions and 3 deletions

View file

@ -1,5 +1,9 @@
# Docusaurus 2 Changelog
## Unreleased
- Added Google analytics and Google gtag plugins.
## 2.0.0-alpha.19
- Add a sensible default for browserslist config.
@ -39,8 +43,6 @@ presets: [
- Minify css for production build
- Fix weird scrolling problem when navigating to a route with a `hash` location
## V2 Changelog
### `siteConfig.js` changes

View file

@ -10,7 +10,7 @@ import clientModules from '@generated/client-modules';
function dispatchLifecycleAction(lifecycleAction, ...args) {
clientModules.forEach(clientModule => {
const mod = clientModule.__esModule ? clientModule.default : clientModule;
if (mod[lifecycleAction]) {
if (mod && mod[lifecycleAction]) {
mod[lifecycleAction](...args);
}
});