@alemonjs/bubble 2.1.9 → 2.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>AlemonJS</title>
7
+ <title>ALemonJS</title>
8
8
  <script type="module" crossorigin src="/assets/index.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index.css">
10
10
  </head>
package/lib/index.js CHANGED
@@ -267,19 +267,21 @@ const main = () => {
267
267
  const params = data.payload?.params;
268
268
  try {
269
269
  const keys = key.split('.');
270
+ let parent = null;
270
271
  let target = client;
271
272
  for (const k of keys) {
272
273
  if (target === null || target === undefined || !(k in target)) {
273
274
  consume([createResult(ResultCode.Fail, '未知请求,请尝试升级版本', null)]);
274
275
  return;
275
276
  }
277
+ parent = target;
276
278
  target = target[k];
277
279
  }
278
280
  if (typeof target !== 'function') {
279
281
  consume([createResult(ResultCode.Fail, '目标不是可调用方法', null)]);
280
282
  return;
281
283
  }
282
- const res = await target(...params);
284
+ const res = await target.call(parent, ...params);
283
285
  consume([createResult(ResultCode.Ok, '请求完成', res)]);
284
286
  }
285
287
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alemonjs/bubble",
3
- "version": "2.1.9",
3
+ "version": "2.1.10",
4
4
  "description": "bubble platform",
5
5
  "author": "lemonade",
6
6
  "license": "MIT",
@@ -62,5 +62,5 @@
62
62
  "type": "git",
63
63
  "url": "https://github.com/lemonade-lab/alemonjs.git"
64
64
  },
65
- "gitHead": "4b0115f3dfec34c18e27f57bf5c0f0164e28394a"
65
+ "gitHead": "fee3935ca19b1658ea4b41d5d3e7f281e7efc932"
66
66
  }