canvas input: prevent resize handler from failing if it's triggered without size data

This commit is contained in:
jean-emmanuel 2016-11-29 22:31:52 +01:00
parent 6528fd076d
commit 57a6d4e61b

View file

@ -23,7 +23,7 @@
var width = width*2,
height = height*2
if (height==100 && width==100) return
if (height==100 && width==100 || !width) return
self.color = getComputedStyle(canvas[0]).getPropertyValue("--color-text")
self.height=height