Ensure ReactPerf always uses a string as a URL

This commit is contained in:
Christoph Pojer authored and Paul O’Shannessy committed 2013-11-20 14:19:13 -08:00
1 parent 04c3e2e407
commit 2fe2cd5337
1 file changed
+1 -1
+1 -1
View File
@@ -68,7 +68,7 @@ var ReactPerf = {
if (__DEV__) {
var ExecutionEnvironment = require('ExecutionEnvironment');
var URL = ExecutionEnvironment.canUseDOM ? window.location.href : '';
var URL = (ExecutionEnvironment.canUseDOM && window.location.href) || '';
ReactPerf.enableMeasure = ReactPerf.enableMeasure ||
!!URL.match(/[?&]react_perf\b/);
}