bug fixed : canavs background color is not getting applied in the viewer mode (#4818)

This commit is contained in:
Manish Kushare 2022-12-15 18:35:16 +05:30 committed by GitHub
parent 71ed5bf490
commit 5ae46081de
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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';
}