This repository was archived by the owner on Sep 16, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export default class CourseInfo extends Component {
7373 const courseRef = firebase . database ( ) . ref ( ) . child ( 'courses' ) . child ( this . course ) ;
7474 courseRef . on ( 'value' , ( data ) => {
7575 // const dataValue = data.val();
76- // console.log("GOT", data);
76+ data = data . val ( ) ;
7777 const reviewAverage = data . totalStars / data . totalReviews ;
7878 if ( Number . isNaN ( reviewAverage ) ) {
7979 that . averageStars = 'No reviews yet.' ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ export default class ReviewForm extends Component {
1515 constructor ( props ) {
1616 super ( props ) ;
1717 console . log ( props ) ;
18- this . handleSubmit . bind ( this ) ;
18+ this . handleSubmit = this . handleSubmit . bind ( this ) ;
1919 this . state_props = props ;
2020 this . course = this . state_props . course ;
2121 this . submitted = undefined ;
@@ -33,7 +33,7 @@ export default class ReviewForm extends Component {
3333
3434 handleSubmit ( event ) {
3535 event . preventDefault ( ) ;
36- const that = this ;
36+ var that = this ;
3737 firebase . auth ( ) . onAuthStateChanged ( ( user ) => {
3838 if ( user ) {
3939 const displayName = user . displayName ;
You can’t perform that action at this time.
0 commit comments