dabernathy89 / vue-query-builder

A UI component for building complex queries with nested conditionals.
https://dabernathy89.github.io/vue-query-builder/
MIT License
643 stars 157 forks source link

TypeError: Cannot read property '$options' of undefined #70

Closed jasiek-net closed 2 years ago

jasiek-net commented 3 years ago
"query-builder-vue": "^1.0.5",
"vue": "^2.5.22",

I have a problem with drag and drop in production version. Everything works in developer mode yarn dev, but on production yarn build I have this error when I try to drag and drop element (it shows on drop actually). I think the problem is with function below:

function getNextGroup(group) {
  if (group.depth < 1) {
    return group;
  }

  var vm = group;

  do {
    vm = vm.$parent;
  } while (vm.$options.name !== 'QueryBuilderGroup');

  return vm;
}

Maybe vm.$options does not exists for minified version?

dabernathy89 commented 3 years ago

Hey @janhorubala - can you reproduce the error in a repo on Github or hosted somewhere like Codesandbox?

rtucek commented 2 years ago

@janhorubala apparently, you filed your bug report in the wrong repo :)

Please have a look at https://github.com/rtucek/vue-query-builder/pull/74

dabernathy89 commented 2 years ago

@rtucek to give me some credit, I was never provided with a repo or link to reproduce the bug. In any case, I've marked this project as deprecated in npm and added a note to the Readme.