Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct aspect chain bug #1204

Merged
merged 8 commits into from
Aug 16, 2021
Merged

fix: correct aspect chain bug #1204

merged 8 commits into from
Aug 16, 2021

Conversation

chenzhaozheng
Copy link
Contributor

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

aspect方法拦截器(切面)

Description of change
  • 解决方法拦截器(切面)链式调用的时候的问题
  • 通过断点调试,查出 packages/core/src/context/midwayContainer.ts的827行,return result后不触发重新检测后面的方法, 会中断掉aspect,改为return this.wrapperAspectToInstance后可以重新Proxy检测处理
  • 已经更新了测试用例
  • 针对该issues出现的问题: 当链式调用方法遇到方法切面只能拦截第一个调用的方法 #939

@gitpod-io
Copy link

gitpod-io bot commented Aug 3, 2021

@czy88840616
Copy link
Member

处理下冲突?

@chenzhaozheng
Copy link
Contributor Author

处理下冲突?

刚有点事情,嗯嗯,我更新了,出现Merging is blocked

@czy88840616
Copy link
Member

build 好像失败了,看下定义?

@chenzhaozheng
Copy link
Contributor Author

build 好像失败了,看下定义?

嗯,冲突没解决好,不好意思,重新push了

Copy link
Contributor Author

@chenzhaozheng chenzhaozheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

少这个home.hello()内容的数据检测,之前只是验证下面的,所以先屏蔽,我调整下吧

@czy88840616
Copy link
Member

lint 没过,run 一下。

@chenzhaozheng
Copy link
Contributor Author

lint 没过,run 一下。

@dreamer2q
Copy link
Contributor

抱歉,在vscode里面点错了,这个 approved 还不知道怎么撤销。。。

@czy88840616
Copy link
Member

@dreamer2q 影响不大

@czy88840616 czy88840616 merged commit 5de5284 into midwayjs:2.x Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants