Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fc-pregmod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pregmodfan
fc-pregmod
Commits
f4b31c73
Commit
f4b31c73
authored
3 years ago
by
Arkerthan
Browse files
Options
Downloads
Patches
Plain Diff
fix diff proxy making properties inaccessible when properties on the same object where changed
parent
3a289cce
No related branches found
No related tags found
1 merge request
!10135
Fix and QoL
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/diff.js
+4
-1
4 additions, 1 deletion
js/diff.js
with
4 additions
and
1 deletion
js/diff.js
+
4
−
1
View file @
f4b31c73
...
...
@@ -2,6 +2,8 @@
* The diff proxy records all changes to the original object without changing the original object while emulating the
* changes for access from outside. The resulting diff object can then be applied on the original. The resulting object
* is the same as if the changes were applied directly to the original object.
*
* NOTE: When doing any changes to this, rerun the tests cases at devNotes/tests.
*/
App
.
Utils
.
Diff
=
(
function
()
{
const
deletedSymbol
=
Symbol
(
"
deleted property
"
);
...
...
@@ -64,7 +66,8 @@ App.Utils.Diff = (function() {
// Deep copy in case array entries get modified later
localDiff
[
key
]
=
_
.
cloneDeep
(
original
);
}
else
if
(
_
.
isObject
(
original
))
{
localDiff
[
key
]
=
{};
// TODO check if there is a way to keep the data structure valid without the need for deep clone
localDiff
[
key
]
=
_
.
cloneDeep
(
original
);
}
}
localDiff
=
localDiff
[
key
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment