Skip to content

Commit

Permalink
Merge pull request #200 from metal/199-Soy_compat
Browse files Browse the repository at this point in the history
Rename singleton as soyRenderer_ and add RENDERER_NAME property
  • Loading branch information
eduardolundgren authored Jan 18, 2017
2 parents 14b4328 + 3ada208 commit a58381c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/metal-soy/src/Soy.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Soy extends IncrementalDomRenderer.constructor {
component.getStateKeys().forEach(key => {
let value = component[key];
if (this.isHtmlParam_(component, key)) {
value = soyRenderer.toIncDom(value);
value = soyRenderer_.toIncDom(value);
}
data[key] = value;
});
Expand Down Expand Up @@ -133,7 +133,7 @@ class Soy extends IncrementalDomRenderer.constructor {
* used to render the component. Defaults to "render".
*/
register(componentCtor, templates, mainTemplate = 'render') {
componentCtor.RENDERER = soyRenderer;
componentCtor.RENDERER = soyRenderer_;
componentCtor.TEMPLATE = SoyAop.getOriginalFn(templates[mainTemplate]);
componentCtor.TEMPLATE.componentCtor = componentCtor;
SoyAop.registerForInterception(templates, mainTemplate);
Expand Down Expand Up @@ -218,8 +218,8 @@ class Soy extends IncrementalDomRenderer.constructor {
}
}

const soyRenderer = new Soy();
Soy.RENDERER_NAME = 'soy';
const soyRenderer_ = new Soy();
soyRenderer_.RENDERER_NAME = 'soy';

export default soyRenderer;
export { soyRenderer as Soy, SoyAop };
export default soyRenderer_;
export { soyRenderer_ as Soy, SoyAop };

0 comments on commit a58381c

Please sign in to comment.