@samitouri / QOS-React-2 / commits / 65c4aeaa3a

use warning module instead of console.debug

Jon Hester committed Mar 5, 2015 at 18:53 UTC 65c4aeaa3a8fb80be4f6f9f3d978601aad678b9f
1 file changed +9 -7
src/browser/ui/React.js
+9 -7
@@ -34,6 +34,7 @@ var ReactServerRendering = require('ReactServerRendering');
34 var assign = require('Object.assign');
35 var findDOMNode = require('findDOMNode');
36 var onlyChild = require('onlyChild');
37 +var warning = require('warning');
38
39 ReactDefaultInjection.inject();
40
@@ -115,13 +116,14 @@ if (__DEV__) {
116
117 // If we're in IE8, check to see if we are in combatibility mode and provide
118 // information on preventing compatibility mode
118 - if (document.documentMode && document.documentMode < 8) {
119 - console.debug(
120 - 'Internet Explorer is running in compatibility mode, please add the following ' +
121 - 'tag to your HTML to prevent this from happening: ' +
122 - '<meta http-equiv="X-UA-Compatible" content="IE=edge" />'
123 - );
124 - }
119 + var ieCompatibilityMode = document.documentMode && document.documentMode < 8;
120 +
121 + warning(
122 + !ieCompatibilityMode,
123 + 'Internet Explorer is running in compatibility mode, please add the following ' +
124 + 'tag to your HTML to prevent this from happening: ' +
125 + '<meta http-equiv="X-UA-Compatible" content="IE=edge" />'
126 + );
127
128 var expectedFeatures = [
129 // shims