Skip to content

widget:option should work as getter only when argument length =1. Fix-ti... #1106

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

Closed
wants to merge 2 commits into from

Conversation

dekajp
Copy link
Contributor

@dekajp dekajp commented Oct 15, 2013

ticket 9601 - Widget: calling _setOption with undefined as 3rd argument makes it a getter

option: function( key, value ) works as setter if value=undefined . Fixed option to allow set key=undefined

…-ticket 9601 - Widget: calling _setOption with undefined as 3rd argument makes it a getter
@@ -580,6 +585,12 @@ test( ".option() - deep option setter", function() {
deepOption( { bar: "baz" }, { bar: "qux" }, "one deep" );
div.testWidget( "option", "foo.bar", "qux" );

deepOption( { bar: "baz" }, { bar: undefined }, "one deep - value = undefined" );
//Note : this assertion will never run if - when option behave like getter
Copy link
Member

Choose a reason for hiding this comment

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

Space after "//", but you can probably just remove this comment altogether.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i will remove this comment - resubmit code .

@tjvantoll
Copy link
Member

This looks good to me.

@jzaefferer
Copy link
Member

Rebased this into a single commit, updating the commit message to match the guidelines and removed a trailing tab in the widget_method.js file, landed in ecde7cd.

@jzaefferer jzaefferer closed this Oct 16, 2013
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