Skip to content

Commit 4041196

Browse files
committed
Fixed Copy as JSON.
1 parent 0d4ce97 commit 4041196

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

code.bundle

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

public/js/func.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,6 +1016,8 @@ FUNC.makejsonfromschema = function(val) {
10161016

10171017
var model = [];
10181018
var lines = val.split('\n');
1019+
var lastindex = lines.length - 1;
1020+
10191021
for (var i = 0; i < lines.length; i++) {
10201022
var line = lines[i].trim();
10211023
var beg = line.indexOf('\'');
@@ -1048,6 +1050,9 @@ FUNC.makejsonfromschema = function(val) {
10481050
if (val.charAt(val.length - 1) === '\'')
10491051
val = val.substring(0, val.length - 1);
10501052

1053+
if (model[model.length - 1])
1054+
model[model.length - 1] += ',';
1055+
10511056
model.push('\t"' + key + '": ' + val.replace(/'/g, '"'));
10521057
}
10531058

0 commit comments

Comments
 (0)