Skip to content

Commit

Permalink
fix: rename FatalError
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jul 7, 2020
1 parent 3587c55 commit 5712ba3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/loader/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const reserveStories = (filePaths: string[]) => {
export const addStoriesDoc = (filePath: string, added: LoadingDocStore) => {
const { components, packages, stories, doc } = added;
if (!doc) {
throw new FatalError(`Invalid store with no document ${filePath}`);
throw new Error(`Invalid store with no document ${filePath}`);
}

Object.keys(components).forEach(key => {
Expand All @@ -109,7 +109,7 @@ export const addStoriesDoc = (filePath: string, added: LoadingDocStore) => {
});
const { title } = doc;
if (store.stores.find(s => s.doc?.title === title)) {
throw new FatalError(`Duplicate document title "${title}"`);
throw new Error(`Duplicate document title "${title}"`);
}
const storeStore = store.stores.find(s => s.filePath === filePath);
if (storeStore) {
Expand Down

0 comments on commit 5712ba3

Please sign in to comment.