From c4a05d608d59a178dbdb7494fedb7a63cf55f96f Mon Sep 17 00:00:00 2001 From: Sean Fridman Date: Tue, 7 Apr 2015 22:19:24 -0400 Subject: Add error catch template stringify filter --- app/node_modules/oktemplate/index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/node_modules/oktemplate/index.js') diff --git a/app/node_modules/oktemplate/index.js b/app/node_modules/oktemplate/index.js index 09a78bf..65f8c18 100644 --- a/app/node_modules/oktemplate/index.js +++ b/app/node_modules/oktemplate/index.js @@ -15,7 +15,11 @@ liquid.registerFilters({ * Useful for quick debugging of template data. */ stringify: function(obj) { - return '
' + stringify(obj) + '
'; + try { + return '
' + stringify(obj) + '
'; + } catch (e) { + return ''; + } } }); -- cgit v1.2.3-70-g09d2