amsik / liquor-tree

Tree component based on Vue.js
MIT License
398 stars 95 forks source link

an error in the source code but ok in the compiled code #210

Open antimonyGu opened 4 years ago

antimonyGu commented 4 years ago

in /src/lib/Tree.js

  checked () {
    if (!this.options.checkbox) {
      return null
    }

    return new Selection(this, ...this.checkedNodes)
  }

in src/lib/Selection.js


export default class Selection extends Array {
  constructor (tree, items = []) {
    /*eslint semi: 0 */
    super();

    this.tree = tree;
    this.push(...items)
  }

The source code has spread the List for two times, in my version of babel it will cause an error in the browser. I will make a pull request when I'm free to fix this problem.