Don't set mustcapture for falsey values
Summary: See discussion in D3722. Good catch -- I'd definitely say this is a bug. Test Plan: Rendered two <div />s, one with mustcapture set to `true` and one to `false`. The first got `data-mustcapture`; the second did not. Reviewers: btrahan Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D3723
This commit is contained in:
@@ -37,7 +37,11 @@ function javelin_render_tag(
|
||||
unset($attributes[$k]);
|
||||
break;
|
||||
case 'mustcapture':
|
||||
$attributes['data-mustcapture'] = '1';
|
||||
if ($v) {
|
||||
$attributes['data-mustcapture'] = '1';
|
||||
} else {
|
||||
unset($attributes['data-mustcapture']);
|
||||
}
|
||||
unset($attributes[$k]);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user