Skip to content
Snippets Groups Projects
Unverified Commit 71e82d18 authored by Allan RIbeiro's avatar Allan RIbeiro Committed by GitHub
Browse files

fix: handle list type values in app setting comparison (old vs new) (#29457)

parent 6938bcd1
No related branches found
No related tags found
No related merge requests found
......@@ -90,7 +90,10 @@ export class AppsEngineService extends ServiceClassInternal implements IAppsEngi
// avoid updating the setting if the value is the same,
// which caused an infinite loop
if (oldSetting === setting.value) {
// and sometimes the settings can be an array
// so we need to convert it to JSON stringified to compare it
if (JSON.stringify(oldSetting) === JSON.stringify(setting.value)) {
Apps.getRocketChatLogger().info(
`"apps.settingUpdated" event received for setting ${setting.id} of app "${appId}", but the setting value is the same`,
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment