HeapsIO / domkit

CSS Components based strictly typed UI framework for Haxe
MIT License
84 stars 20 forks source link

Uncaught TypeError (JavaScript target) #37

Closed phelioz closed 2 years ago

phelioz commented 2 years ago

After domkit commit 366bd67 and heaps commit HeapsIO/heaps@8e4ac8f I get an error when trying to add object to style style.addObject(container); Only happens on JavaScript target.

This is the error:

CssStyle.hx:350 Uncaught TypeError: Cannot read properties of undefined (reading 'fill')
    at h2d_domkit_Style.applyStyle (CssStyle.hx:350:3)
    at domkit_Properties.applyStyle (Properties.hx:95:3)
    at h2d_domkit_Style.addObject (Style.hx:36:3)
    at new game_stages_MainMenu (MainMenu.hx:34:3)
    at Application.init (Application.hx:49:13)
    at App.hx:148:4
    at Application.loadAssets (App.hx:176:3)
    at Application.setup (App.hx:146:3)
    at h3d_Engine.onCreate (Engine.hx:256:4)
    at onLoad (GlDriver.hx:1610:5)
ncannasse commented 2 years ago

Seems like componentBits is null so fill will fail. You can try setting useSmartCache=false , or I have pushed a potential fix