summaryrefslogtreecommitdiff
path: root/Messages/JSON.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Messages/JSON.hs')
-rw-r--r--Messages/JSON.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Messages/JSON.hs b/Messages/JSON.hs
index 48e48ec73..897eb8cbf 100644
--- a/Messages/JSON.hs
+++ b/Messages/JSON.hs
@@ -87,10 +87,11 @@ finalize jsonoptions o
addErrorMessage :: [String] -> Object -> Object
addErrorMessage msg o =
- HM.insertWith combinearray "error-messages" (Array $ V.fromList msg ) o
+ HM.insertWith combinearray "error-messages" v o
where
combinearray (Array new) (Array old) = Array (old <> new)
combinearray new _old = new
+ v = Array $ V.fromList $ map (String . T.pack) msg
note :: String -> JSONBuilder
note _ Nothing = Nothing