ultimate-express 1.3.6 → 1.3.7
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.
- package/package.json +1 -1
- package/src/middlewares.js +1 -4
package/package.json
CHANGED
package/src/middlewares.js
CHANGED
|
@@ -144,11 +144,8 @@ function createBodyParser(defaultType, beforeReturn) {
|
|
|
144
144
|
if(typeof options.limit === 'undefined') options.limit = bytes('100kb');
|
|
145
145
|
else options.limit = bytes(options.limit);
|
|
146
146
|
|
|
147
|
-
if(typeof options.type === 'undefined') options.type = defaultType;
|
|
148
|
-
else if(typeof options.type !== 'string') {
|
|
149
|
-
throw new Error('type must be a string');
|
|
150
|
-
}
|
|
151
147
|
if(typeof options.inflate === 'undefined') options.inflate = true;
|
|
148
|
+
if(typeof options.type === 'undefined') options.type = defaultType;
|
|
152
149
|
if(typeof options.type === 'string') {
|
|
153
150
|
if(!options.type.includes("*")) {
|
|
154
151
|
options.simpleType = options.type;
|