Procházet zdrojové kódy

[Router] _handleError: joinProject error-context may not have project_id

The ol_context patch changed the priority of client context and rpc
 context.
This lead to the (possibly missing) project_id of the client context
 overwriting the project_id of the rpc context.
REF: f1d55c0a5437a518e9f4617473caed9ba928e648
Jakob Ackermann před 6 roky
rodič
revize
8e31cc5c23
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      services/real-time/app/js/Router.js

+ 1 - 1
services/real-time/app/js/Router.js

@@ -28,7 +28,7 @@ module.exports = Router = {
   _handleError(callback, error, client, method, attrs) {
     attrs = attrs || {}
     for (const key of ['project_id', 'user_id']) {
-      attrs[key] = client.ol_context[key]
+      attrs[key] = attrs[key] || client.ol_context[key]
     }
     attrs.client_id = client.id
     attrs.err = error