Skip to content

Commit cb4776d

Browse files
committed
DESIGNER-2727 fix
1 parent a90b4fc commit cb4776d

File tree

4 files changed

+120
-2
lines changed

4 files changed

+120
-2
lines changed

dist/scripts/api-console.js

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5264,6 +5264,66 @@ RAML.Inspector = (function() {
52645264
};
52655265
})();
52665266

5267+
(function () {
5268+
/* jshint -W034 */
5269+
'use strict';
5270+
5271+
if (!Array.prototype.find) {
5272+
Array.prototype.find = function (predicate) {
5273+
for (var i = 0, len = this.length; i < len; i++) {
5274+
var item = this[i];
5275+
if (predicate(item)) {
5276+
return item;
5277+
}
5278+
}
5279+
return undefined;
5280+
};
5281+
}
5282+
5283+
if (!Array.prototype.includes) {
5284+
Array.prototype.includes = function (value) {
5285+
for (var i = 0, len = this.length; i < len; i++) {
5286+
var item = this[i];
5287+
if (item === value) {
5288+
return true;
5289+
}
5290+
}
5291+
return false;
5292+
};
5293+
}
5294+
})();
5295+
5296+
(function () {
5297+
/* jshint -W034 */
5298+
'use strict';
5299+
5300+
if (typeof Object.assign !== 'function') {
5301+
Object.defineProperty(Object, 'assign', {
5302+
value: function assign(target, varArgs) {
5303+
'use strict';
5304+
if (target == null) { throw new TypeError('Cannot convert undefined or null to object'); }
5305+
5306+
var to = Object(target);
5307+
5308+
for (var index = 1; index < varArgs.length; index++) {
5309+
var nextSource = varArgs[index];
5310+
5311+
if (nextSource != null) {
5312+
for (var nextKey in nextSource) {
5313+
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
5314+
to[nextKey] = nextSource[nextKey];
5315+
}
5316+
}
5317+
}
5318+
}
5319+
return to;
5320+
},
5321+
writable: true,
5322+
configurable: true
5323+
});
5324+
}
5325+
})();
5326+
52675327
(function() {
52685328
'use strict';
52695329

@@ -7171,7 +7231,7 @@ RAML.Inspector = (function() {
71717231
var checkInValue = values.find(function (value) {
71727232
return value.toLowerCase() === check
71737233
});
7174-
return checkInValue ? true : false;
7234+
return !!checkInValue;
71757235
}
71767236
};
71777237

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
(function () {
2+
/* jshint -W034 */
3+
'use strict';
4+
5+
if (!Array.prototype.find) {
6+
Array.prototype.find = function (predicate) {
7+
for (var i = 0, len = this.length; i < len; i++) {
8+
var item = this[i];
9+
if (predicate(item)) {
10+
return item;
11+
}
12+
}
13+
return undefined;
14+
};
15+
}
16+
17+
if (!Array.prototype.includes) {
18+
Array.prototype.includes = function (value) {
19+
for (var i = 0, len = this.length; i < len; i++) {
20+
var item = this[i];
21+
if (item === value) {
22+
return true;
23+
}
24+
}
25+
return false;
26+
};
27+
}
28+
})();
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
(function () {
2+
/* jshint -W034 */
3+
'use strict';
4+
5+
if (typeof Object.assign !== 'function') {
6+
Object.defineProperty(Object, 'assign', {
7+
value: function assign(target, varArgs) {
8+
'use strict';
9+
if (target == null) { throw new TypeError('Cannot convert undefined or null to object'); }
10+
11+
var to = Object(target);
12+
13+
for (var index = 1; index < varArgs.length; index++) {
14+
var nextSource = varArgs[index];
15+
16+
if (nextSource != null) {
17+
for (var nextKey in nextSource) {
18+
if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {
19+
to[nextKey] = nextSource[nextKey];
20+
}
21+
}
22+
}
23+
}
24+
return to;
25+
},
26+
writable: true,
27+
configurable: true
28+
});
29+
}
30+
})();

src/vendor/raml-validate/raml-validate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@
214214
var checkInValue = values.find(function (value) {
215215
return value.toLowerCase() === check
216216
});
217-
return checkInValue ? true : false;
217+
return !!checkInValue;
218218
}
219219
};
220220

0 commit comments

Comments
 (0)