diff --git a/services/web/app/views/project/editor/track-changes.jade b/services/web/app/views/project/editor/track-changes.jade index 9300172afc..eacf7b982e 100644 --- a/services/web/app/views/project/editor/track-changes.jade +++ b/services/web/app/views/project/editor/track-changes.jade @@ -74,9 +74,11 @@ div#trackChanges(ng-show="ui.view == 'track-changes'") span.doc {{ doc.entity.name }} div.users div.user(ng-repeat="update_user in update.meta.users") - .color-square(ng-style="{'background-color': 'hsl({{ update_user.hue }}, 70%, 50%)'}") + .color-square(ng-if="update_user != null", ng-style="{'background-color': 'hsl({{ update_user.hue }}, 70%, 50%)'}") + .color-square(ng-if="update_user == null", ng-style="{'background-color': 'hsl(100, 70%, 50%)'}") .name(ng-if="update_user.id != user.id") {{update_user.first_name}} {{update_user.last_name}} .name(ng-if="update_user.id == user.id") You + .name(ng-if="update_user == null") #{translate("anonymous")} div.user(ng-if="update.meta.users.length == 0") .color-square(style="background-color: hsl(100, 100%, 50%)") span #{translate("anonymous")} diff --git a/services/web/public/coffee/ide/track-changes/TrackChangesManager.coffee b/services/web/public/coffee/ide/track-changes/TrackChangesManager.coffee index 7817cb8725..4098f860f4 100644 --- a/services/web/public/coffee/ide/track-changes/TrackChangesManager.coffee +++ b/services/web/public/coffee/ide/track-changes/TrackChangesManager.coffee @@ -187,7 +187,8 @@ define [ doc.entity = @ide.fileTreeManager.findEntityById(doc_id, includeDeleted: true) for user in update.meta.users or [] - user.hue = @ide.onlineUsersManager.getHueForUserId(user.id) + if user? + user.hue = @ide.onlineUsersManager.getHueForUserId(user.id) if !previousUpdate? or !moment(previousUpdate.meta.end_ts).isSame(update.meta.end_ts, "day") update.meta.first_in_day = true