From 4b71cf2efe1d476f6d2217c7d7c9a17648eefda7 Mon Sep 17 00:00:00 2001 From: Matthew Dapena-Tretter Date: Thu, 3 Apr 2014 22:12:50 -0400 Subject: [PATCH] Combine valid value checks --- src/browser/ui/dom/DOMProperty.js | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/browser/ui/dom/DOMProperty.js b/src/browser/ui/dom/DOMProperty.js index 6c88b11622..bd8f507c9f 100644 --- a/src/browser/ui/dom/DOMProperty.js +++ b/src/browser/ui/dom/DOMProperty.js @@ -132,15 +132,11 @@ var DOMPropertyInjection = { propName ); invariant( - !DOMProperty.hasBooleanValue[propName] || - !DOMProperty.hasNumericValue[propName], - 'DOMProperty: Cannot have both boolean and numeric value: %s', - propName - ); - invariant( - !DOMProperty.hasBooleanValue[propName] || - !DOMProperty.hasBooleanishValue[propName], - 'DOMProperty: Cannot have boolean and booleanish value: %s', + !!DOMProperty.hasBooleanValue[propName] + + !!DOMProperty.hasNumericValue[propName] + + !!DOMProperty.hasBooleanishValue[propName] <= 1, + 'DOMProperty: Value can be one of boolean, booleanish, or numeric ' + + 'value, but not a combination: %s', propName ); }