mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-11 00:27:23 +02:00
handle empty initial groups when comparing
This commit is contained in:
parent
3311df5e1f
commit
5c46cecf6a
1 changed files with 8 additions and 2 deletions
|
@ -1306,7 +1306,9 @@ function badgeSidebarForDifferences(changedElement) {
|
||||||
var isGrouped = $('#' + panelParentID).hasClass('grouped');
|
var isGrouped = $('#' + panelParentID).hasClass('grouped');
|
||||||
|
|
||||||
if (isGrouped) {
|
if (isGrouped) {
|
||||||
var initialPanelJSON = Settings.initialValues[panelParentID];
|
var initialPanelJSON = Settings.initialValues[panelParentID]
|
||||||
|
? Settings.initialValues[panelParentID]
|
||||||
|
: {};
|
||||||
|
|
||||||
// get a JSON representation of that section
|
// get a JSON representation of that section
|
||||||
var panelJSON = form2js(panelParentID, ".", false, cleanupFormValues, true)[panelParentID];
|
var panelJSON = form2js(panelParentID, ".", false, cleanupFormValues, true)[panelParentID];
|
||||||
|
@ -1595,7 +1597,11 @@ function updateDataChangedForSiblingRows(row, forceTrue) {
|
||||||
|
|
||||||
// get a JSON representation of that section
|
// get a JSON representation of that section
|
||||||
var panelSettingJSON = form2js(panelParentID, ".", false, cleanupFormValues, true)[panelParentID][tableShortName]
|
var panelSettingJSON = form2js(panelParentID, ".", false, cleanupFormValues, true)[panelParentID][tableShortName]
|
||||||
var initialPanelSettingJSON = Settings.initialValues[panelParentID][tableShortName]
|
if (Settings.initialValues[panelParentID]) {
|
||||||
|
var initialPanelSettingJSON = Settings.initialValues[panelParentID][tableShortName]
|
||||||
|
} else {
|
||||||
|
var initialPanelSettingJSON = {};
|
||||||
|
}
|
||||||
|
|
||||||
// if they are equal, we don't need data-changed
|
// if they are equal, we don't need data-changed
|
||||||
isTrue = !_.isEqual(panelSettingJSON, initialPanelSettingJSON)
|
isTrue = !_.isEqual(panelSettingJSON, initialPanelSettingJSON)
|
||||||
|
|
Loading…
Reference in a new issue