Skip to content

Commit f749d29

Browse files
committed
MOBILE-1701 assign: Fix error when leaving edit view too soon
1 parent 17c1e7e commit f749d29

File tree

1 file changed

+1
-1
lines changed
  • www/addons/mod/assign/controllers

1 file changed

+1
-1
lines changed

www/addons/mod/assign/controllers/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ angular.module('mm.addons.mod_assign')
137137
// Function called when user wants to leave view without saving.
138138
function leaveView() {
139139
// Check that we're leaving the current view, since the user can navigate to other views from here.
140-
if ($ionicHistory.currentView() !== currentView) {
140+
if ($ionicHistory.currentView() !== currentView || !$scope.userSubmission) {
141141
// It's another view.
142142
originalBackFunction();
143143
return;

0 commit comments

Comments
 (0)