Skip to content

Commit

Permalink
🐛 bug: fix isarray change
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Apr 9, 2020
1 parent 368abad commit bcbd071
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function toHump(name: string) {
}

function formatter(data: MenuDataItem[]): MenuDataItem[] {
if (Array.isArray(data)) {
if (!Array.isArray(data)) {
return data;
}
(data || []).forEach((item = { path: '/' }) => {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function toHump(name: string) {
}

function formatter(data: MenuDataItem[]): MenuDataItem[] {
if (Array.isArray(data)) {
if (!Array.isArray(data)) {
return [];
}
let icons = [];
Expand Down

0 comments on commit bcbd071

Please sign in to comment.