Avoid failure if existing target has no background color
This commit is contained in:
@@ -114,10 +114,11 @@ class CanvasLayerRenderer extends LayerRenderer {
|
||||
target.style.opacity === '' &&
|
||||
opacity === 1 &&
|
||||
(!opt_backgroundColor ||
|
||||
equals(
|
||||
asArray(target.style.backgroundColor),
|
||||
asArray(opt_backgroundColor)
|
||||
))
|
||||
(target.style.backgroundColor &&
|
||||
equals(
|
||||
asArray(target.style.backgroundColor),
|
||||
asArray(opt_backgroundColor)
|
||||
)))
|
||||
) {
|
||||
const canvas = target.firstElementChild;
|
||||
if (canvas instanceof HTMLCanvasElement) {
|
||||
|
||||
Reference in New Issue
Block a user