]> git.kaiwu.me - njs.git/commitdiff
Tests262: fixed merge() with null values.
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 31 Jan 2025 03:10:29 +0000 (19:10 -0800)
committerDmitry Volyntsev <xeioexception@gmail.com>
Sat, 8 Feb 2025 02:14:25 +0000 (18:14 -0800)
test/harness/runTsuite.js

index 5ba0ef461207671ffd17656f64f71d33e4da1277..1823e4a2054d405860a2f1b6afa4449bd8f118bb 100644 (file)
@@ -63,7 +63,7 @@ function merge(to, from) {
         if (typeof r[v] == 'object' && typeof from[v] == 'object') {
             r[v] = merge(r[v], from[v]);
 
-        } else if (typeof from[v] == 'object') {
+        } else if (typeof from[v] == 'object' && from[v] !== null) {
             if (Buffer.isBuffer(from[v])) {
                 r[v] = Buffer.from(from[v]);