瀏覽代碼

fix background color on image export

Konstantinos Kaloutas 1 年之前
父節點
當前提交
18666550a9
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      src/main/frontend/components/export.cljs

+ 1 - 2
src/main/frontend/components/export.cljs

@@ -95,8 +95,7 @@
 
 
 (defn- get-image-blob
 (defn- get-image-blob
   [block-uuids-or-page-name {:keys [transparent-bg? x y width height zoom]} callback]
   [block-uuids-or-page-name {:keys [transparent-bg? x y width height zoom]} callback]
-  (let [html js/document.body.parentNode
-        style (js/window.getComputedStyle html)
+  (let [style (js/window.getComputedStyle js/document.body)
         background (when-not transparent-bg? (.getPropertyValue style "--ls-primary-background-color"))
         background (when-not transparent-bg? (.getPropertyValue style "--ls-primary-background-color"))
         page? (string? block-uuids-or-page-name)
         page? (string? block-uuids-or-page-name)
         selector (if page?
         selector (if page?