fix: type error if default returns nil :foreground/:background

Ref: #8059
This commit is contained in:
Henrik Lissner 2024-09-10 17:20:16 -04:00
parent e6514cdf47
commit 86b7bef512
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -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)))))))
;;