summaryrefslogtreecommitdiff
path: root/org-roam-ui.el
diff options
context:
space:
mode:
Diffstat (limited to 'org-roam-ui.el')
-rw-r--r--org-roam-ui.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el
index 2d4eb98..9b8590e 100644
--- a/org-roam-ui.el
+++ b/org-roam-ui.el
@@ -50,15 +50,16 @@
(cons 'target (elt row 2))))
(defservlet* theme application/json ()
- (when 'doom-themes--colors
+ (progn
+ (if
+ (boundp 'doom-themes--colors)
(let*
- ((colors (butlast doom-themes--colors (- (length doom-themes--colors) 25)))
- ui-theme (list nil))
- (progn
- (dolist (color colors)
- (push (cons (car color) (car (cdr color))) ui-theme))
- (insert (json-encode ui-theme))
- (httpd-send-header t "text/plain" 200 :Access-Control-Allow-Origin "*")))))
-
+ ((colors (butlast doom-themes--colors (- (length doom-themes--colors) 25))) ui-theme (list nil))
+ (progn
+ (dolist (color colors)
+ (push (cons (car color) (car (cdr color))) ui-theme))
+ (insert (json-encode ui-theme))))
+ (insert "{}"))
+ (httpd-send-header t "application/json" 200 :Access-Control-Allow-Origin "*")))
(provide 'org-roam-ui)