Skip to content

Commit 00d97e0

Browse files
added filter to item.distill to remove view data
1 parent 64d6fa3 commit 00d97e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/item.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,11 @@ Item.distill = function(item) {
434434

435435
Object.keys(item.data).forEach(function(key) {
436436
if (key.match(/^_/)) return;
437-
distilled_item[key] = item.data[key];
437+
var item_data = item.data[key];
438+
if ( typeof item_data == 'object' ) {
439+
delete item_data["_view_data"];
440+
}
441+
distilled_item[key] = item_data;
438442
});
439443

440444
return distilled_item;

0 commit comments

Comments
 (0)