diff --git a/lib/bemhtml/runtime/index.js b/lib/bemhtml/runtime/index.js index 8719f740..bd4305dd 100644 --- a/lib/bemhtml/runtime/index.js +++ b/lib/bemhtml/runtime/index.js @@ -136,6 +136,8 @@ BEMHTML.prototype.runMany = function runMany(arr) { }; BEMHTML.prototype.runOne = function runOne(context) { + if (context === undefined) + return ''; if (utils.isSimple(context)) return context + ''; diff --git a/test/api-test.js b/test/api-test.js index 9655487b..abc4d464 100644 --- a/test/api-test.js +++ b/test/api-test.js @@ -200,4 +200,14 @@ describe('BEMHTML compiler', function() { }, '