Guest User

Untitled

a guest
Feb 18th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. On Client:
  2.  
  3. now.foo = function() {
  4. console.log("foo");
  5.  
  6. };
  7.  
  8. I cann call this function from Server with
  9.  
  10. user.now.foo();
  11.  
  12. But if I redeclare the foo-function on client:
  13.  
  14. now.foo = function() {
  15. console.log("bar");
  16. };
  17.  
  18. I cannot call it anymore from the Server. It sais;
  19.  
  20. TypeError: Property 'foo' of object #<Object> is not a function
  21.  
  22. Is there a way to override a function in the now-namespace?
Add Comment
Please, Sign In to add comment