Use hasOwnProperty to check for key presence in object

(grafted from cf8342493b04bbe07b172f2e078549ef3de00210)

--HG--
branch : 7.0
This commit is contained in:
Nicolas Évrard committed 2025-04-15 18:38:45 +02:00
1 parent ae4f4c3ba1
commit fdab2269a1
1 file changed
+1 -1
+1 -1
View File
@@ -2472,7 +2472,7 @@
if (record2) {
var vals_to_set = {};
for (var key in vals) {
if (!(key in new_field_names)) {
if (!Object.prototype.hasOwnProperty.call(new_field_names, key)) {
vals_to_set[key] = vals[key];
}
}