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

Guard node.setSizeMode() against null values in "famous:core:node" #50

Merged
merged 1 commit into from Jul 7, 2015

Conversation

pilwon
Copy link
Contributor

@pilwon pilwon commented Jul 6, 2015

There is a case where a behavior sends an event to node (ex: size-absolute-x) with $payload being either actual size value or null depends on repeat $index as follows:

{
  '$repeat': [...],
  'size-absolute-x': function($index) {
    return ($index % 2 === 0) ? null : 10;
  }
}

This PR adds null guards to all $public events within famous:core:node such that internally it does not update node.setSizeMode with incorrect value when $payload === null.

matthewtoast added a commit that referenced this pull request Jul 7, 2015
Guard node.setSizeMode() against null values in "famous:core:node"
@matthewtoast matthewtoast merged commit c6d5f03 into Famous:develop Jul 7, 2015
@pilwon
Copy link
Contributor Author

pilwon commented Jul 7, 2015

@matthewtoast That was a very quick merge. Thanks! 👍

@pilwon pilwon deleted the setsizemode-null-guard branch July 7, 2015 00:00
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.

None yet

2 participants