appease eslint
This commit is contained in:
parent
6f826ce7a0
commit
675c3d27ba
|
@ -19,13 +19,13 @@ const formatAnchor = function(type = null, time = moment()) {
|
|||
}
|
||||
|
||||
return moment(time).format(format);
|
||||
}
|
||||
};
|
||||
|
||||
const zeroDecimalCurrencies = ['MGA', 'BIF', 'CLP', 'PYG', 'DFJ', 'RWF', 'GNF', 'UGX', 'JPY', 'VND', 'VUV', 'XAF', 'KMF', 'KRW', 'XOF', 'XPF'];
|
||||
|
||||
const formatAmount = function(amount, currency) {
|
||||
let zeroDecimal = zeroDecimalCurrencies.indexOf(currency) > -1;
|
||||
return zeroDecimal ? amount : (amount / 100).toFixed(2);
|
||||
}
|
||||
};
|
||||
|
||||
export { formatAnchor, formatAmount, zeroDecimalCurrencies }
|
||||
export { formatAnchor, formatAmount, zeroDecimalCurrencies };
|
||||
|
|
|
@ -2,7 +2,6 @@ import { createWidget } from 'discourse/widgets/widget';
|
|||
import { h } from 'virtual-dom';
|
||||
import { avatarFor } from 'discourse/widgets/post';
|
||||
import { userPath } from "discourse/lib/url";
|
||||
import { iconNode } from "discourse-common/lib/icon-library";
|
||||
|
||||
function donationDisplay(amount, type) {
|
||||
return h(`div.donations-${type}`, [
|
||||
|
@ -85,7 +84,7 @@ createWidget('category-header-widget', {
|
|||
}
|
||||
})
|
||||
])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (category.donations_release_latest) {
|
||||
|
@ -104,7 +103,7 @@ createWidget('category-header-widget', {
|
|||
}
|
||||
})
|
||||
])
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (metadata.length) {
|
||||
|
|
|
@ -85,8 +85,6 @@ export function setup(helper) {
|
|||
]);
|
||||
if (helper.markdownIt) {
|
||||
setupMarkdownIt(helper, siteSettings);
|
||||
} else {
|
||||
console.log("Please upgrade Discourse to a later version in order to use this plugin");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue