Updating to 0.10.x
dimm0 opened this issue · comments
Describe the bug
Trying to update from 0.9.6 to 0.10.x. Starting from 0.10.0, getting:
[Vue warn]: Error in created hook: "TypeError: Cannot read property 'observable' of undefined"
found in
---> <GanttElastic> at src/GanttElastic.vue
<Gantt>
<Root>
and a bunch of other similar errors.
To Reproduce
Steps to reproduce the behavior:
const options = {
};
var tasks = [];
Vue.use(Vuex);
const store = new Vuex.Store({
state: {
tasks,
options,
},
mutations: {
updateTasks(state, tasks) {
state.tasks = tasks.map(task => task);
},
updateOptions(state, options) {
state.options = { ...options };
},
}
});
Vue.component('gantt', {
template:`<gantt-elastic :tasks="$store.state.tasks" :options="$store.state.options">
</gantt-elastic>`,
store,
components: {
"gantt-elastic": GanttElastic,
},
});
var planComp = new Vue({
el: 'plan',
data: function () {
return {
};
},
template: `
<div>
<gantt>
</gantt>
</div>
`
});
Expected behavior
Expect to work with code above
which stack do you use? webpack? vue-cli?
None of those, just straight JS on client
Show html head code and those part with <script>
s or if it is small whole index.html
The whole html is <plan></plan>
I have a bunch of stuff in JS, but I deleted everything to what I posted above. If you don't see anything obvious and it should work this way, I'll do a minimal codepen example that shows the problem.
ok
I've found this bug too, so in next release it will be fixed
Woohoo!
I was struggling to make even simple example work in codepen.. was not finding GanttElastic object
fixed in 0.12.0 👍