Skip to content

Commit

Permalink
Update ES5 version
Browse files Browse the repository at this point in the history
  • Loading branch information
paramaggarwal committed Sep 14, 2016
1 parent e3c9366 commit c1d8b03
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
var React = require('react');

var component = React.createClass({
displayName: 'component',
export default class Progress extends React.component {

This comment has been minimized.

Copy link
@jonathanong

jonathanong Sep 14, 2016

now you have to compile your node moduels with babel for htis to work

This comment has been minimized.

Copy link
@paramaggarwal

paramaggarwal Sep 16, 2016

Author Contributor

This is a generated file using npm run build in this project... Please help out using a PR, if possible.


render: function () {
render() {

var completed = +this.props.completed;
if (completed < 0) {
const completed = +this.props.completed;

This comment has been minimized.

Copy link
@jonathanong

jonathanong Sep 14, 2016

why are you declaring const when you're changing it in the lines below?

This comment has been minimized.

Copy link
@paramaggarwal

paramaggarwal Sep 16, 2016

Author Contributor

This is a generated file using npm run build in this project... Please help out using a PR, if possible.

if (completed = NaN || completed < 0) {

This comment has been minimized.

Copy link
@jonathanong

jonathanong Sep 14, 2016

why are you setting completed to NaN? it shouldn't even be == or === - you have to use isNaN

This comment has been minimized.

Copy link
@paramaggarwal

paramaggarwal Sep 16, 2016

Author Contributor

This is a generated file using npm run build in this project... Please help out using a PR, if possible.

completed = 0;
};
if (completed > 100) {
completed = 100;
};

var style = {
const style = {
backgroundColor: this.props.color || '#0BD318',
width: completed + '%',
transition: "width 200ms",
Expand All @@ -30,6 +29,4 @@ var component = React.createClass({
)
);
}
});

module.exports = component;
};

0 comments on commit c1d8b03

Please sign in to comment.