From 456e8bd9c0ce65ebe147b0942609ad64d43b32ce Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Thu, 19 Nov 2015 10:14:01 +0100 Subject: [PATCH] New FIXME. --- src/api.js | 2 ++ src/index.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/api.js b/src/api.js index fa6a285a3..9c614169e 100644 --- a/src/api.js +++ b/src/api.js @@ -204,6 +204,8 @@ export default class Api { throw new MethodNotFound(name) } + // FIXME: it can cause issues if there any property assignments in + // XO methods called from the API. const context = Object.create(this.context) context.api = this // Used by system.*(). context.session = session diff --git a/src/index.js b/src/index.js index ef34b2cb2..da285d6ee 100644 --- a/src/index.js +++ b/src/index.js @@ -384,6 +384,8 @@ const apiHelpers = { } const setUpApi = (webSocketServer, xo) => { + // FIXME: it can cause issues if there any property assignments in + // XO methods called from the API. const context = { __proto__: xo, ...apiHelpers } const api = new Api({