Skip to content

Commit

Permalink
We should call publish function directly.
Browse files Browse the repository at this point in the history
Otherwise there are issues with argument checking and
audit-argument-checks.
  • Loading branch information
mitar committed Sep 28, 2014
1 parent 8b603df commit 7d8a87a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/middleware/server.coffee
Expand Up @@ -107,8 +107,7 @@ class globals.PublishEndpoint

@publish otherMiddlewares, publish
else
publish._handler = @publishFunction
publish._runHandler()
@publishFunction.apply publish, publish.params()

use: (middleware) =>
throw new Error "Middleware '#{ middleware }' is not an instance of a PublishMiddleware class" unless middleware instanceof PublishMiddleware
Expand Down

0 comments on commit 7d8a87a

Please sign in to comment.