vendor/assets/javascripts/handlebars.js in handlebars_assets-0.23.3 vs vendor/assets/javascripts/handlebars.js in handlebars_assets-0.23.4

- old
+ new

@@ -1,9 +1,9 @@ /**! @license - handlebars v4.1.0 + handlebars v4.1.2 Copyright (C) 2011-2017 by Yehuda Katz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -273,11 +273,11 @@ var _logger = __webpack_require__(20); var _logger2 = _interopRequireDefault(_logger); - var VERSION = '4.1.0'; + var VERSION = '4.1.2'; exports.VERSION = VERSION; var COMPILER_REVISION = 7; exports.COMPILER_REVISION = COMPILER_REVISION; var REVISION_CHANGES = { @@ -866,11 +866,17 @@ exports.__esModule = true; exports['default'] = function (instance) { instance.registerHelper('lookup', function (obj, field) { - return obj && obj[field]; + if (!obj) { + return obj; + } + if (field === 'constructor' && !obj.propertyIsEnumerable(field)) { + return undefined; + } + return obj[field]; }); }; module.exports = exports['default']; @@ -2167,11 +2173,11 @@ } }; lexer.options = {}; lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { function strip(start, end) { - return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end); + return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); } var YYSTATE = YY_START; switch ($avoiding_name_collisions) { case 0: @@ -2204,11 +2210,11 @@ // returns the second top instead of the first top. Opened an // issue about it at https://github.com/zaach/jison/issues/291 if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { return 15; } else { - yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9); + strip(5, 9); return 'END_RAW_BLOCK'; } break; case 5: @@ -2768,11 +2774,11 @@ }; } function id(token) { if (/^\[.*\]$/.test(token)) { - return token.substr(1, token.length - 2); + return token.substring(1, token.length - 1); } else { return token; } } @@ -4834,6 +4840,6 @@ module.exports = exports['default']; /***/ }) /******/ ]) }); -; \ No newline at end of file +;