Skip to content

Commit

Permalink
Fix Cannot read property 'proxyOf' of undefined exception (#1377)
Browse files Browse the repository at this point in the history
  • Loading branch information
igorkamyshev committed Nov 27, 2020
1 parent d228d5c commit 9e52e87
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/hacks/grid-utils.js
Expand Up @@ -511,7 +511,15 @@ function insertAreas (css, isDisabled) {

// if we can't find the area name, update lastRule and continue
if (!area) {
let lastRuleIndex = css.index(rulesToInsert[lastArea].lastRule)
let lastRule = rulesToInsert[lastArea].lastRule
let lastRuleIndex
if (lastRule) {
lastRuleIndex = css.index(lastRule)
} else {
/* istanbul ignore next */
lastRuleIndex = -1
}

if (gridAreaRuleIndex > lastRuleIndex) {
rulesToInsert[lastArea].lastRule = gridAreaMedia || gridAreaRule
}
Expand Down

0 comments on commit 9e52e87

Please sign in to comment.