Currently the following code on line 5 of omega.js is throwing up a javascript error:

 drupalSettings.omega.currentBreakpoints = {
    'All' : true
  };
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vaccinemedia created an issue. See original summary.

federicoc’s picture

Seeing this on a fresh install of Omega on Drupal 8.1.

Any ideas?

ytsurk’s picture

got the same error, as soon as i disable screenDemo ...

ytsurk’s picture

sorry - the last patch did not work ..

ytsurk’s picture

hmm -- next ;)

ytsurk’s picture

Title: Cannot set property 'currentBreakpoints' of undefined on omega.js » If screenDemo is disabled: Cannot set property 'currentBreakpoints' of undefined on omega.js
Status: Active » Needs review

So - if the screen demo block is disabled, omega.js produces errors.

This patch just makes sure settings are there, maybe the js should not be invoked if the setting is empty thoe .. would be more performant.

himerus’s picture

Assigned: Unassigned » himerus

  • himerus committed bb064bd on 8.x-5.x
    #2648808 currentBreakpoints undefined fix.
    
himerus’s picture

Assigned: himerus » Unassigned
Status: Needs review » Fixed

This is fixed in latest dev commit.

Indeed the thought did need to change. The logic in omega.theme needed to occur regardless of if screenDemo was turned on or not. This allows there to be flags during responsive breakpoint changes that can be acted upon by other javascript. So the drupalSettings.omega.currentBreakpoints is always available.

It was the way it was since the only usage of it initially was the demo indicator.

Latest of 8.x-5.x-dev should solve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.