diff --git a/src/components/gridList/grid-list.js b/src/components/gridList/grid-list.js index 93a95ca8559..d1efede00f8 100644 --- a/src/components/gridList/grid-list.js +++ b/src/components/gridList/grid-list.js @@ -382,6 +382,10 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia) { function getRowHeight() { var rowHeight = $mdMedia.getResponsiveAttribute(attrs, 'md-row-height'); + if (!rowHeight) { + throw 'md-grid-list: md-row-height attribute was not found'; + } + switch (getRowMode()) { case 'fixed': return applyDefaultUnit(rowHeight); @@ -395,6 +399,10 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia) { function getRowMode() { var rowHeight = $mdMedia.getResponsiveAttribute(attrs, 'md-row-height'); + if (!rowHeight) { + throw 'md-grid-list: md-row-height attribute was not found'; + } + if (rowHeight == 'fit') { return 'fit'; } else if (rowHeight.indexOf(':') !== -1) {