Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix(store): don't try to save when there is no styleguide
Browse files Browse the repository at this point in the history
fix #101
  • Loading branch information
Lasse Küchler authored and Alexpeschel committed Dec 21, 2017
1 parent e74debf commit f9ef1dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/store/store.ts
Expand Up @@ -309,7 +309,9 @@ export class Store {
*/
public openStyleguide(styleguidePath: string): void {
// TODO: Replace workaround by proper dirty-check handling
this.save();
if (this.currentPage) {
this.save();
}

MobX.transaction(() => {
if (!PathUtils.isAbsolute(styleguidePath)) {
Expand Down

0 comments on commit f9ef1dd

Please sign in to comment.