Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Betty985 committed May 3, 2022
1 parent 21cb7a6 commit a73a032
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/hooks/usePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ export function usePanel() {
list.value = list.value.filter((item) => !item.focused);
}
function layerTop() {
const currentItem = current.value;
let max = Math.max(...list.value.map((item) => item.z));
let max = Math.max(...list.value.map((item) => item.z)) || 0;
if (!max) return;
currentItem.z = max + 1;
current.value.z = max + 1;
}
function layerBottom() {
const currentItem = current.value;
Expand Down

0 comments on commit a73a032

Please sign in to comment.