no-conflict.js 382 B

12345678910111213
  1. /* global window */
  2. export default function(Handlebars) {
  3. /* istanbul ignore next */
  4. let root = typeof global !== 'undefined' ? global : window,
  5. $Handlebars = root.Handlebars;
  6. /* istanbul ignore next */
  7. Handlebars.noConflict = function() {
  8. if (root.Handlebars === Handlebars) {
  9. root.Handlebars = $Handlebars;
  10. }
  11. return Handlebars;
  12. };
  13. }