Skip to content
This repository has been archived by the owner on Aug 26, 2020. It is now read-only.

Commit

Permalink
Undeprecate the encode helper function as it is used (#83)
Browse files Browse the repository at this point in the history
* Undeprecate the encode helper function as it is used

* Add context to helper deprecation warning
  • Loading branch information
i-like-robots authored May 1, 2019
1 parent a5076bb commit 041ae02
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/extend-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function deprecate(helper) {
return function (...args) {
if (process.env.NODE_ENV !== 'production') {
// eslint-disable-next-line no-console
console.warn(`The Handlebars helper ${helper.name} has been deprecated.`);
console.warn(`The Handlebars helper ${helper.name} has been deprecated. Please talk to the Core UI team if you need to use it in your application templates. If you are not using this helper it may be used by a dependency, in which case you can ignore this warning.`);
}

return Reflect.apply(helper, this, args);
Expand All @@ -24,7 +24,7 @@ module.exports = function (helpers) {
helpers.unlessEquals = require('./helpers/unlessEquals');
helpers.dateformat = require('./helpers/dateformat');
helpers.resize = require('./helpers/resize');
helpers.encode = deprecate(require('./helpers/encode'));
helpers.encode = require('./helpers/encode');
helpers.decodeHtmlEntities = deprecate(require('./helpers/decodeHtmlEntities'));
helpers.defineBlock = require('./helpers/defineBlock');
helpers.outputBlock = require('./helpers/outputBlock');
Expand Down

0 comments on commit 041ae02

Please sign in to comment.