From 29dfce32bdb6741b72d0a57d111a6ae3cbe658e6 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 24 Sep 2022 21:36:57 +0200 Subject: [PATCH] fix(doom-dashboard): hide benchmark until available The dashboard has a chance to display before doom-init-time is calculated. To prevent the resulting type error, hide it until it is ready. --- modules/ui/doom-dashboard/config.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 3999af026..dbe057da3 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -445,14 +445,15 @@ What it is set to is controlled by `+doom-dashboard-pwd-policy'." ?\n))))) (defun doom-dashboard-widget-loaded () - (insert - "\n\n" - (propertize - (+doom-dashboard--center - +doom-dashboard--width - (doom-display-benchmark-h 'return)) - 'face 'doom-dashboard-loaded) - "\n")) + (when doom-init-time + (insert + "\n\n" + (propertize + (+doom-dashboard--center + +doom-dashboard--width + (doom-display-benchmark-h 'return)) + 'face 'doom-dashboard-loaded) + "\n"))) (defun doom-dashboard-widget-shortmenu () (let ((all-the-icons-scale-factor 1.45)