mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 23:01:04 +01:00
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:
parent
b986f9f731
commit
1105cfc3a8
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue