Skip to content

Commit c6efa0c

Browse files
authored
Merge pull request #1199 from Particular/json-rendering
Fix JSON payloads not being prettyfied
2 parents f8c9de8 + d8e8ff3 commit c6efa0c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ServicePulse.Host/app/js/services/services.service-control.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
method: 'GET',
147147
transformResponse: function(defaults, transform) {
148148
// Remove any comments from the body before deserializing
149-
return defaults.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, function (m, g) { return g ? "" : m });
149+
return JSON.parse(defaults.replace(/\\"|"(?:\\"|[^"])*"|(\/\/.*|\/\*[\s\S]*?\*\/)/g, function (m, g) { return g ? "" : m }));
150150
}
151151
});
152152
}

0 commit comments

Comments
 (0)