浏览代码

Pagination: fix a potential exception with new deps

Leopoldthecoder 7 年之前
父节点
当前提交
b3062de0d2
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      packages/pagination/src/pagination.js

+ 2 - 0
packages/pagination/src/pagination.js

@@ -74,6 +74,8 @@ export default {
     const rightWrapper = <div class="el-pagination__rightwrapper"></div>;
     let haveRightWrapper = false;
 
+    template.children = template.children || [];
+    rightWrapper.children = rightWrapper.children || [];
     components.forEach(compo => {
       if (compo === '->') {
         haveRightWrapper = true;