Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Templates overwritten if file is loaded twice #835

@MartinKei

Description

@MartinKei

We experienced problems on a site where we inject our widget and dynamically load Handlebars runtime when the host site already has loaded handlebars.

In the initializiation the Handlebars object is freshly created nevertheless if there's already an object or not. That leads to overwriting already defined templates.

A simple workaround is to add code similar to that:

var Handlebars = Handlebars || (function() { /* code */ })();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions