1
0
Fork 0
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:
epriestley 2012-10-17 08:35:57 -07:00
parent b986f9f731
commit 1105cfc3a8

View file

@ -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;
}