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

[6.x] Fixed vueAttribute for older Vue 2.x projects #970

Merged
merged 2 commits into from
Apr 4, 2022

Conversation

myMartek
Copy link
Contributor

@myMartek myMartek commented Apr 4, 2022

No description provided.

@myMartek
Copy link
Contributor Author

myMartek commented Apr 4, 2022

The latest release contains a bug:

For vue 2.0 projects there is a return el.__vue.'.$key.';' statement even though the correct way to query vue is using __vue__

@driesvints
Copy link
Member

Ping @derekmd

@driesvints driesvints changed the title Fixed vueAttribute for older Vue 2.X projects [6.x] Fixed vueAttribute for older Vue 2.x projects Apr 4, 2022
@derekmd
Copy link
Contributor

derekmd commented Apr 4, 2022

Whoops, sorry, don't know how that snuck through.

@driesvints
Copy link
Member

@derekmd no worries. Does the fix look good to you?

@derekmd
Copy link
Contributor

derekmd commented Apr 4, 2022

Yup, it's good. Code snippet from pre-Vue 3 fixes:

return $this->driver->executeScript(
"var el = document.querySelector('".$fullSelector."');".
"return typeof el.__vue__ === 'undefined' ".
'? JSON.parse(JSON.stringify(el.__vueParentComponent.ctx)).'.$key.
': el.__vue__.'.$key
);

@taylorotwell taylorotwell merged commit f42844d into laravel:6.x Apr 4, 2022
@myMartek myMartek deleted the bugfix/vue-attribute-for-vue-2 branch April 4, 2022 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants