node-pluginsmanager-plugin 6.2.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -88,14 +88,14 @@ class Mediator extends DescriptorUser_1.default {
|
|
|
88
88
|
return !foundPathMethod ? Promise.reject(new ReferenceError("Unknown operationId \"" + operationId + "\"")) : new Promise((resolve, reject) => {
|
|
89
89
|
// no content, no validation
|
|
90
90
|
if (204 === res.statusCode) {
|
|
91
|
-
return "undefined" !== typeof res.body ? reject(new ReferenceError("You should not have content data with 204 statusCode")) : resolve();
|
|
91
|
+
return "undefined" !== typeof res.body && "" !== res.body.trim() ? reject(new ReferenceError("You should not have content data with 204 statusCode")) : resolve();
|
|
92
92
|
}
|
|
93
93
|
// no content, no validation (put requests)
|
|
94
94
|
else if (201 === res.statusCode && "undefined" === typeof res.body) {
|
|
95
95
|
return resolve();
|
|
96
96
|
}
|
|
97
97
|
// validator cannot correctly check pure boolean return
|
|
98
|
-
else if ("undefined" !== typeof res.body && ["true", "false"].includes(res.body)) {
|
|
98
|
+
else if ("undefined" !== typeof res.body && ["true", "false"].includes(res.body.trim())) {
|
|
99
99
|
return resolve();
|
|
100
100
|
}
|
|
101
101
|
else {
|