FIX: ES5 file shouldn't have `const` in it
This commit is contained in:
parent
49a6d0b789
commit
3d392670a7
|
@ -6,7 +6,7 @@ const TITLE_SUBS = {
|
||||||
daily: 'today',
|
daily: 'today',
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Ember.Handlebars.makeBoundHelper(function (period, options) {
|
export default Ember.Helper.helper(function (period, options) {
|
||||||
const title = I18n.t('filters.top.' + (TITLE_SUBS[period] || 'this_week'));
|
const title = I18n.t('filters.top.' + (TITLE_SUBS[period] || 'this_week'));
|
||||||
if (options.hash.showDateRange) {
|
if (options.hash.showDateRange) {
|
||||||
var dateString = "";
|
var dateString = "";
|
||||||
|
|
|
@ -70,10 +70,10 @@
|
||||||
|
|
||||||
function buildPath(blk, args) {
|
function buildPath(blk, args) {
|
||||||
|
|
||||||
const result = { type: "PathExpression",
|
var result = { type: "PathExpression",
|
||||||
data: false,
|
data: false,
|
||||||
depth: blk.path.depth,
|
depth: blk.path.depth,
|
||||||
loc: blk.path.loc };
|
loc: blk.path.loc };
|
||||||
|
|
||||||
// Server side precompile doesn't have jquery.extend
|
// Server side precompile doesn't have jquery.extend
|
||||||
Object.keys(args).forEach(function (a) {
|
Object.keys(args).forEach(function (a) {
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
// This allows us to use the same syntax in all templates
|
// This allows us to use the same syntax in all templates
|
||||||
visitor.BlockStatement = function(block) {
|
visitor.BlockStatement = function(block) {
|
||||||
if (block.path.original === 'each' && block.params.length === 1) {
|
if (block.path.original === 'each' && block.params.length === 1) {
|
||||||
const paramName = block.program.blockParams[0];
|
var paramName = block.program.blockParams[0];
|
||||||
block.params = [ buildPath(block, { original: paramName }),
|
block.params = [ buildPath(block, { original: paramName }),
|
||||||
{ type: "CommentStatement", value: "in" },
|
{ type: "CommentStatement", value: "in" },
|
||||||
block.params[0] ];
|
block.params[0] ];
|
||||||
|
|
Loading…
Reference in New Issue