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

Computed value should check data type #241

Open
patric-eberle opened this issue Feb 6, 2018 · 1 comment
Open

Computed value should check data type #241

patric-eberle opened this issue Feb 6, 2018 · 1 comment
Labels

Comments

@patric-eberle
Copy link

I'm currently figuring out why I still get the error from #195 with the latest version in my implementation. Beside that I noticed some critical data handling in the computed properties of basic-dialog.js:

this.get('containerClassNames').join(' '),

The marked line gets the containerClassNames data and executes join() without type testing. This is meant to crash, since the default is already null, the computed is listening to other properties as well and invalid data could also be given from outside. Note, that there are multiple places in this file, where the same issue occurs.

@patric-eberle
Copy link
Author

I think the #195 related error was also triggered by one/some of the computed values of basic-dialog.js in this case. I initially had defined custom classes for wrapperClass, overlayClass and containerClassNames. Which caused crashing in IE11. I now added an array value for wrapperClassNames and overlayClassNames and the modal is now also working in IE11. I guess, that the computed values now at least have valid data to work with (but did not further investigate it).

Did not work in IE:

{{#modal-dialog
    wrapperClass=_wrapperClass
    overlayClass=_overlayClass
    containerClassNames=_containerClassNames
    hasOverlay=hasOverlay
    renderInPlace=renderInPlace
    targetAttachment=_targetAttachment
    onClickOverlay=(action "onClickOverlay")
}}
{{/modal-dialog}}

Does work in IE:

{{#modal-dialog
    wrapperClass=_wrapperClass
    overlayClass=_overlayClass
    containerClassNames=_containerClassNames
    wrapperClassNames=_wrapperClassNames
    overlayClassNames=_overlayClassNames
    hasOverlay=hasOverlay
    renderInPlace=renderInPlace
    targetAttachment=_targetAttachment
    onClickOverlay=(action "onClickOverlay")
}}
{{/modal-dialog}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants