mirror of
https://github.com/gosticks/PaperWM.git
synced 2026-10-05 03:46:53 +00:00
Don't remove negative indexes
This commit is contained in:
@@ -156,6 +156,8 @@ remove_handler = (ws, meta_window) => {
|
||||
// window has already received the `focus` signal at this point.
|
||||
|
||||
let removed_i = pages.indexOf(meta_window)
|
||||
if (removed_i < 0)
|
||||
return
|
||||
pages.splice(removed_i, 1)
|
||||
|
||||
// At this point the `focus` index might be invalid so we correct it:
|
||||
|
||||
Reference in New Issue
Block a user