fix: doom-module-context: nil doom-module-context

If a module isn't enabled, this should silently set the context to an
empty array, not nil, which causes a (aref nil 2) type error.
This commit is contained in:
Henrik Lissner 2022-09-26 02:08:07 +02:00
parent b8038e93cf
commit 07171185bb
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -139,7 +139,7 @@ If NAME is omitted, GROUP is treated as a module key cons cell: (GROUP . NAME)."
(let* ((key (if name (cons group name) group))
(group (or (car-safe key) key))
(name (cdr-safe key))
(data (get group name)))
(data (or (get group name) doom--empty-module)))
(vector group name
(aref data (doom-module--context-field flags))
(aref data (doom-module--context-field features)))))