Skip to content
Snippets Groups Projects
Commit 31fc7e61 authored by Rodrigo Nascimento's avatar Rodrigo Nascimento
Browse files

EnvironmentConnection; Prevent problems with methods without connection

parent 01bfddca
No related branches found
Tags 7.4.0-rc.1
No related merge requests found
...@@ -17,7 +17,11 @@ Meteor.methods = (methods) -> ...@@ -17,7 +17,11 @@ Meteor.methods = (methods) ->
_.each methods, (func, name) -> _.each methods, (func, name) ->
methods[name] = -> methods[name] = ->
self = this self = this
RocketChat.connection.withValue this.connection, -> if not self.connection?
func.apply self, arguments
return
RocketChat.connection.withValue self.connection, ->
func.apply self, arguments func.apply self, arguments
originalMethods methods originalMethods methods
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment