From 4adfb48205e00068051657695d8d4184c9a94da1 Mon Sep 17 00:00:00 2001 From: utvara Date: Sat, 11 Feb 2012 23:18:44 +0100 Subject: [PATCH] Fixed a bug when context is a string --- mustache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mustache.js b/mustache.js index 90a66d3cb..641cebd57 100644 --- a/mustache.js +++ b/mustache.js @@ -149,7 +149,7 @@ var Mustache = (typeof module !== "undefined" && module.exports) || {}; localStack.push(context); } - if (context && target in context) { + if (context && typeof context === "object" && target in context) { value = context[target]; break; }