diff --git a/README.md b/README.md index f8977b7..f278aa3 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,9 @@ new Vue({ // Optionally we can watch the parameters for changes in nested // objects using the 'deep' option deep: true, + // Optionally we can decide whether to freeze data + // using the 'freeze' option + freeze: true, //// Meteor Reactivity // This will be refresh each time above params changes from Vue // Then it calls Tracker.autorun() to refresh the result diff --git a/src/vue-plugin.js b/src/vue-plugin.js index 78ea28b..1930ff7 100644 --- a/src/vue-plugin.js +++ b/src/vue-plugin.js @@ -119,7 +119,7 @@ export default { if (result && typeof result.fetch === 'function') { result = result.fetch(); } - if(Vue.config.meteor.freeze) { + if(options.freeze === true || Vue.config.meteor.freeze && options.freeze === undefined) { result = Object.freeze(result); } this[key] = result;