From 86b7bef5127c48e94df1c4f515f517383913d368 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 10 Sep 2024 17:20:16 -0400 Subject: [PATCH] fix: type error if default returns nil :foreground/:background Ref: #8059 --- lisp/doom-ui.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/doom-ui.el b/lisp/doom-ui.el index 1d0e5978c..09cd845d2 100644 --- a/lisp/doom-ui.el +++ b/lisp/doom-ui.el @@ -590,8 +590,10 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original (put 'doom-theme 'previous-themes (or last-themes 'none)) ;; DEPRECATED Hook into `enable-theme-functions' when we target 29 (doom-run-hooks 'doom-load-theme-hook) - (setf (alist-get 'foreground-color default-frame-alist) (face-foreground 'default nil t) - (alist-get 'background-color default-frame-alist) (face-background 'default nil t))))))) + (when-let* ((fg (face-foreground 'default nil t)) + (bg (face-background 'default nil t))) + (setf (alist-get 'foreground-color default-frame-alist) fg + (alist-get 'background-color default-frame-alist) bg))))))) ;;