From 1a2789c9229f6a6bd4c9001667f3134ec8b8247b Mon Sep 17 00:00:00 2001 From: roife Date: Thu, 5 Oct 2023 23:46:46 +0800 Subject: [PATCH] fix(workspaces): check before loading tab configuration Fix: #7139 --- modules/ui/workspaces/autoload/workspaces.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index 678cae5b8..840ca1d5c 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -598,8 +598,9 @@ This be hooked to `projectile-after-switch-project-hook'." ;;;###autoload (defun +workspaces-load-tab-bar-data-from-file-h (&rest _) "Restores the tab bar data from file." - (tab-bar-tabs-set (persp-parameter 'tab-bar-tabs)) - (tab-bar--update-tab-bar-lines t)) + (when-let ((persp-tab-data (persp-parameter 'tab-bar-tabs))) + (tab-bar-tabs-set persp-tab-data) + (tab-bar--update-tab-bar-lines t))) ;; ;;; Advice