vue2-waterfall icon indicating copy to clipboard operation
vue2-waterfall copied to clipboard

Fix object prop default error

Open zwubs opened this issue 3 years ago • 0 comments

Problem

When using the module through npm an error occurs stating:

[Vue warn]: Invalid default value for prop "option": Props with type Object/Array must use a factory function to return the default value.

Solution

Within 'waterfall.vue' changing the 'option' prop to state this: default: () => {} rather than this: default: {}

Files Changed

  • waterfall.vue: Updated line 15 to previously mentioned code.
  • vue2-waterfall.js: Rebuilt file to incorporate aforementioned changes.

zwubs avatar Dec 24 '21 20:12 zwubs