Fixed backGroundUrl
Former-commit-id: e2628694c61f734f52b3ac6f2ffab6c9f1b39b55
This commit is contained in:
parent
8e4ef972d8
commit
d33a23526c
|
@ -369,9 +369,10 @@ export default class VisualConsole {
|
|||
public render(prevProps: VisualConsoleProps | null = null): void {
|
||||
if (prevProps) {
|
||||
if (prevProps.backgroundURL !== this.props.backgroundURL) {
|
||||
this.containerRef.style.backgroundImage = `url(${
|
||||
this.props.backgroundURL
|
||||
})`;
|
||||
this.containerRef.style.backgroundImage =
|
||||
this.props.backgroundURL !== null
|
||||
? `url(${this.props.backgroundURL})`
|
||||
: null;
|
||||
}
|
||||
if (prevProps.backgroundColor !== this.props.backgroundColor) {
|
||||
this.containerRef.style.backgroundColor = this.props.backgroundColor;
|
||||
|
@ -380,9 +381,11 @@ export default class VisualConsole {
|
|||
this.resizeElement(this.props.width, this.props.height);
|
||||
}
|
||||
} else {
|
||||
this.containerRef.style.backgroundImage = `url(${
|
||||
this.props.backgroundURL
|
||||
})`;
|
||||
this.containerRef.style.backgroundImage =
|
||||
this.props.backgroundURL !== null
|
||||
? `url(${this.props.backgroundURL})`
|
||||
: null;
|
||||
|
||||
this.containerRef.style.backgroundColor = this.props.backgroundColor;
|
||||
this.resizeElement(this.props.width, this.props.height);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue