diff --git a/erp_web/js/common/common.js b/erp_web/js/common/common.js index 7c57f2fb..fb9f6ba6 100644 --- a/erp_web/js/common/common.js +++ b/erp_web/js/common/common.js @@ -57,10 +57,12 @@ } function dgResize() { var searchTabHeight = $('#searchTable').height(); - $('#tableData').datagrid('resize', { - width: $(window).width() - 6, - height: $(window).height() - searchTabHeight -46 - }); + if($('#tableData').length) { + $('#tableData').datagrid('resize', { + width: $(window).width() - 6, + height: $(window).height() - searchTabHeight -46 + }); + } } $(window).resize(function () { dgResize();