Skip to content

Commit 28cfb27

Browse files
"release v1.0.0-alpha.20"
1 parent 4b73e0e commit 28cfb27

6 files changed

Lines changed: 23 additions & 18 deletions

File tree

dist/ref-parser.js

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.$RefParser = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
22
/**!
3-
* JSON Schema $Ref Parser v1.0.0-alpha.19
3+
* JSON Schema $Ref Parser v1.0.0-alpha.20
44
*
55
* @link https://github.com/BigstickCarpet/json-schema-ref-parser
66
* @license MIT
@@ -535,13 +535,18 @@ function merge(src, dest) {
535535
var topKeys = Object.keys(src);
536536
for (var i = 0; i < topKeys.length; i++) {
537537
var topKey = topKeys[i];
538-
var child = src[topKey];
539-
var childKeys = Object.keys(child);
540-
for (var j = 0; j < childKeys.length; j++) {
541-
var childKey = childKeys[j];
542-
var childValue = child[childKey];
543-
if (childValue !== undefined) {
544-
dest[topKey][childKey] = childValue;
538+
var srcChild = src[topKey];
539+
if (dest[topKey] === undefined) {
540+
dest[topKey] = srcChild;
541+
}
542+
else {
543+
var childKeys = Object.keys(srcChild);
544+
for (var j = 0; j < childKeys.length; j++) {
545+
var childKey = childKeys[j];
546+
var srcChildValue = srcChild[childKey];
547+
if (srcChildValue !== undefined) {
548+
dest[topKey][childKey] = srcChildValue;
549+
}
545550
}
546551
}
547552
}

dist/ref-parser.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ref-parser.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ref-parser.min.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/bundle.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**!
2-
* JSON Schema $Ref Parser v1.0.0-alpha.19
2+
* JSON Schema $Ref Parser v1.0.0-alpha.20
33
*
44
* @link https://github.com/BigstickCarpet/json-schema-ref-parser
55
* @license MIT

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "json-schema-ref-parser",
3-
"version": "1.0.0-alpha.19",
3+
"version": "1.0.0-alpha.20",
44
"description": "Parse, Resolve, and Dereference JSON Schema $ref pointers",
55
"keywords": [
66
"json",

0 commit comments

Comments
 (0)