Merge pull request #1686 from marxjohnson/MOBILE-2721_integration

MOBILE-2721 Keep existing displayname if not set
main
Juan Leyva 2018-12-20 13:02:42 +01:00 committed by GitHub
commit 6ce9d7bec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -171,6 +171,10 @@ export class CoreCourseSectionPage implements OnDestroy {
// Error getting the course, probably guest access.
}).then((course) => {
if (course) {
if (this.course.id === course.id && this.course.hasOwnProperty('displayname')
&& !course.hasOwnProperty('displayname')) {
course.displayname = this.course.displayname;
}
this.course = course;
}