Skip to content

Fix string refs#14

Open
drdla wants to merge 3 commits intoguiqui:masterfrom
drdla:fix_string_refs
Open

Fix string refs#14
drdla wants to merge 3 commits intoguiqui:masterfrom
drdla:fix_string_refs

Conversation

@drdla
Copy link
Copy Markdown

@drdla drdla commented Dec 26, 2018

The timeline (v 0.4.0) did not render in my app, because of errors related to string refs.
I fixed the ref assignments and added two missing dependencies (moment and sizeme).
A few failing tests are fixed now, but there are still two failing tests.
Nevertheless, at least the build of this branch is now working in my app.

);
};
shouldComponentUpdate(nextProps, nextState) {
if (nextProps.value != this.props.value) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strict inequality operator should be used !==

Comment on lines +43 to +46
if (position == 'top') return 'MMMM YYYY';
else return 'MMMM';
case 'week':
if (position == 'top') return 'ww MMMM YYYY';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strict equality operator should be used ===

let hourWidth = width / 24;
let iterLeft = 0;
for (let i = 0; i < 24; i++) {
result.push(<HeaderItem key={i} left={iterLeft} width={hourWidth} label={mode == 'shorttime' ? i : `${i}:00`} />);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strict equality operator should be used ===

currentBottom = currentDate.format(this.getFormat(bottom));
box = this.getBox(currentDate, bottom, lastLeft.bottom);
lastLeft.bottom = box.left + box.width;
if (bottom == 'shorttime' || bottom == 'fulltime') {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strict equality operator should be used ===

Comment on lines +195 to +199
//Check boundaries to see if wee need to recalcualte header
// if (this.needToRender()|| !this.cache){
// this.cache=this.renderHeader();
// this.setBoundaries();
// }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented code should not be pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants