Fix JSON.stringify (#2759)

There was a wrong check on the property types, it did not check that the
property was name accessor. Also fixed a test case.

JerryScript-DCO-1.0-Signed-off-by: Istvan Miklos imiklos2@inf.u-szeged.hu
This commit is contained in:
Istvan Miklos
2019-02-19 11:29:13 +01:00
committed by László Langó
parent 60bbd731e5
commit 9c10d82e4a
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ function completeAssign (target, sources) {
}
var copy = completeAssign ({}, [obj]);
assert (JSON.stringify (copy) === '{"foo":1}');
assert (JSON.stringify (copy) === '{"foo":1,"bar":2}');
assert (copy.bar === 2);
// Test when target is not coercible to object