ultimate-express 2.0.3 → 2.0.5
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/router.js +4 -3
package/package.json
CHANGED
package/src/router.js
CHANGED
|
@@ -496,9 +496,6 @@ module.exports = class Router extends EventEmitter {
|
|
|
496
496
|
if(thingamabob) {
|
|
497
497
|
if(thingamabob === 'route' || thingamabob === 'skipPop') {
|
|
498
498
|
if(route.use && thingamabob !== 'skipPop') {
|
|
499
|
-
if(req._isOptions) {
|
|
500
|
-
return resolve(false);
|
|
501
|
-
}
|
|
502
499
|
req._stack.pop();
|
|
503
500
|
|
|
504
501
|
req._opPath = req._stack.length > 0 ? req._originalPath.replace(this.getFullMountpath(req), '') : req._originalPath;
|
|
@@ -546,6 +543,10 @@ module.exports = class Router extends EventEmitter {
|
|
|
546
543
|
req._errorKey = route.routeKey;
|
|
547
544
|
}
|
|
548
545
|
if(routed) return resolve(true);
|
|
546
|
+
else if(req._isOptions && req._matchedMethods.size) {
|
|
547
|
+
// OPTIONS routing is different, it stops in the router if matched
|
|
548
|
+
return resolve(false);
|
|
549
|
+
}
|
|
549
550
|
next();
|
|
550
551
|
} else {
|
|
551
552
|
// handle errors and error handlers
|