New FIXME.

This commit is contained in:
Julien Fontanet 2015-11-19 10:14:01 +01:00
parent d5f2efac26
commit 456e8bd9c0
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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({