mirror of https://github.com/docker/docs.git
Added react lint support and fixed possible NaN
Signed-off-by: FrenchBen <me@frenchben.com>
This commit is contained in:
parent
9d830fc5ac
commit
98bb98934e
|
|
@ -1,5 +1,8 @@
|
|||
root: true
|
||||
|
||||
plugins:
|
||||
- react
|
||||
|
||||
ecmaFeatures:
|
||||
modules: true
|
||||
jsx: true
|
||||
|
|
|
|||
|
|
@ -65,7 +65,8 @@
|
|||
"babel": "^5.1.10",
|
||||
"babel-jest": "^5.2.0",
|
||||
"electron-prebuilt": "^0.27.3",
|
||||
"eslint": "^1.0.0",
|
||||
"eslint": "^1.3.1",
|
||||
"eslint-plugin-react": "^3.3.0",
|
||||
"grunt": "^0.4.5",
|
||||
"grunt-babel": "^5.0.1",
|
||||
"grunt-chmod": "^1.0.3",
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ var ContainerHome = React.createClass({
|
|||
|
||||
render: function () {
|
||||
if (!this.props.container) {
|
||||
return;
|
||||
return '';
|
||||
}
|
||||
|
||||
let body;
|
||||
|
|
@ -70,6 +70,9 @@ var ContainerHome = React.createClass({
|
|||
}
|
||||
|
||||
sum = sum / this.props.container.Progress.amount;
|
||||
if (isNaN(sum)) {
|
||||
sum = 0;
|
||||
}
|
||||
|
||||
body = (
|
||||
<div className="details-progress">
|
||||
|
|
|
|||
Loading…
Reference in New Issue