Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MOBILE-1619 home: Redirect to My courses if sitehome is forced but empty #673

Merged
merged 1 commit into from Oct 13, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion www/core/components/login/services/helper.js
Expand Up @@ -84,7 +84,11 @@ angular.module('mm.core.login')
// Configured to go to Site Home. Check if plugin is installed in the app.
var $mmaFrontpage = $mmAddonManager.get('$mmaFrontpage');
if ($mmaFrontpage) {
return $state.go('site.mm_course-section');
return $mmaFrontpage.isFrontpageAvailable().then(function() {
return $state.go('site.mm_course-section');
}).catch(function() {
return $state.go('site.mm_courses');
});
}
}

Expand Down