Index: branches/REL1_18/extensions/FlaggedRevs/presentation/modules/review.js |
— | — | @@ -359,4 +359,8 @@ |
360 | 360 | FlaggedRevsReview.enableAjaxReview(); |
361 | 361 | |
362 | 362 | // Flag users as "no longer reviewing" on navigate-away |
363 | | -window.onbeforeunload = FlaggedRevsReview.deadvertiseReviewing; |
| 363 | +window.onbeforeunload = function( e ) { |
| 364 | + if ( FlaggedRevsReview.isUserReviewing == 1 ) { |
| 365 | + FlaggedRevsReview.deadvertiseReviewing(); |
| 366 | + } |
| 367 | +}; |