Commit 2f6cb5df authored by nanahira's avatar nanahira

fix

parent f762b468
......@@ -60,7 +60,7 @@ export class ProtoMiddlewareDispatcher<
// buildMiddlewares 只需要知道 inst
if (args.length === 0) return [];
const inst = args[args.length - 1];
const inst = args[0];
if (!inst || typeof inst !== 'object') return [];
// 1. 收集原型链(Base → Sub)
......
......@@ -54,7 +54,7 @@ describe('ProtoMiddlewareDispatcher', () => {
order.push('base:normal');
expect(inst).toBeInstanceOf(Base);
expect(inst.value).toBe(8); // 5 + 3
expect(x).toBe(7);
expect(x).toBe(555);
++inst.value;
return next();
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment