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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-express",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "The Ultimate Express. Fastest http server with full Express compatibility, based on uWebSockets.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -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;