We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72d1510 commit d8c413eCopy full SHA for d8c413e
src/api/data.js
@@ -148,13 +148,25 @@ exports.$log = function (path) {
148
? Path.get(this._data, path)
149
: this._data
150
if (data) {
151
- data = JSON.parse(JSON.stringify(data))
+ data = clean(data)
152
}
153
// include computed fields
154
if (!path) {
155
for (var key in this.$options.computed) {
156
- data[key] = this[key]
+ data[key] = clean(this[key])
157
158
159
console.log(data)
160
161
+
162
+/**
163
+ * "clean" a getter/setter converted object into a plain
164
+ * object copy.
165
+ *
166
+ * @param {Object} - obj
167
+ * @return {Object}
168
+ */
169
170
+function clean (obj) {
171
+ return JSON.parse(JSON.stringify(obj))
172
+}
0 commit comments