Fork me on GitHub
#hyperfiddle
<
2024-06-10
>
nakkaya12:06:19

Just as an FYI following snippet,

(dom/span
 (dom/props {:class "badge badge-info"})
 (let [size (-> (get-in state [:events :storage])
                (/ 1024)
                (/ 1024))
       size (cond (zero? size)  "0 MB"
                  (< size 1024) (str ( "%.2f" size) " MB")
                  :else (str (gstring/format "%.2f" (/ size 1024)) " GB"))]
   (dom/text size)))
worked fine on v2-alpha-469-gb6d9865c for both prod and dev builds, however on v2-alpha-540-ga4699532 it works in dev build but fails on prod build [1]. Replacing gstring/format with toFixed solves the issue. @dustingetz [1] https://gist.github.com/nakkaya/a4d441f93b30d6136f8a6343cc1d327d

👀 1
👍 1