Skip to content

Commit

Permalink
initialise earlier, fixes #3116
Browse files Browse the repository at this point in the history
  • Loading branch information
moloko committed Apr 12, 2021
1 parent 9a94a64 commit 1f69e08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/js/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Device extends Backbone.Controller {
this.renderingEngine = this.getRenderingEngine();
this.onWindowResize = _.debounce(this.onWindowResize.bind(this), 100);
this.listenTo(Adapt, {
'app:dataReady': this.onDataReady
'configModel:dataLoaded': this.onConfigDataLoaded
});
const browser = this.browser.toLowerCase();
// Convert 'msie' and 'internet explorer' to 'ie'.
Expand All @@ -35,7 +35,7 @@ class Device extends Backbone.Controller {
return this.screenWidth / this.screenHeight;
}

onDataReady() {
onConfigDataLoaded() {
this.screenSize = this.checkScreenSize();
this.$html.addClass('size-' + this.screenSize);
if (this.orientation) {
Expand Down

0 comments on commit 1f69e08

Please sign in to comment.