From 5ae46081dec106d7a5629c88a89b6a15d6c680f8 Mon Sep 17 00:00:00 2001 From: Manish Kushare Date: Thu, 15 Dec 2022 18:35:16 +0530 Subject: [PATCH] bug fixed : canavs background color is not getting applied in the viewer mode (#4818) --- frontend/src/Editor/Viewer.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/Editor/Viewer.jsx b/frontend/src/Editor/Viewer.jsx index 0f5d7137e1..4495d60305 100644 --- a/frontend/src/Editor/Viewer.jsx +++ b/frontend/src/Editor/Viewer.jsx @@ -261,9 +261,11 @@ class ViewerComponent extends React.Component { } computeCanvasBackgroundColor = () => { - const resolvedBackgroundColor = - resolveReferences(this.state.appDefinition?.globalSettings?.backgroundFxQuery, this.state.currentState) ?? + const bgColor = + (this.state.appDefinition.globalSettings?.backgroundFxQuery || + this.state.appDefinition.globalSettings?.canvasBackgroundColor) ?? '#edeff5'; + const resolvedBackgroundColor = resolveReferences(bgColor, this.state.currentState); if (['#2f3c4c', '#edeff5'].includes(resolvedBackgroundColor)) { return this.props.darkMode ? '#2f3c4c' : '#edeff5'; }