Skip to content

Commit

Permalink
fix: support no option (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahungrynoob committed Nov 16, 2019
1 parent 4acd1fb commit 43acad6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type MetaInfo =
text: string;
};

function showdownToc({ toc }: { toc?: TocItem[] }) {
function showdownToc({ toc }: { toc?: TocItem[] } = {}) {
return () => [
{
type: 'output',
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/toc-meta-info/option.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default {};
export default undefined;

0 comments on commit 43acad6

Please sign in to comment.