canjs / can-compile

Compile CanJS Mustache and EJS views for lightning fast production apps
http://daffl.github.com/can-compile
MIT License
35 stars 15 forks source link

Can Compile output didn't work properly with CanJS 2.1 #22

Closed tracer99 closed 10 years ago

tracer99 commented 10 years ago

Two issues. One was easy, the compiled template file calls can.view.preload, but should call can.view.preloadStringRenderer.

The other I'm not clear on. In can.ejs from 2.1.1 there is the following lines: viewData.templateType = "legacy"; if (viewData.tagName) { viewCallbacks.tagHandler(el, viewData.tagName, viewData); }

For certain templates, viewData was undefined. Wrapping these lines with a test for the presence of viewData seems to have fixed things. Tests show the templates that were causing the problem rendered correctly. Stopped trying to figure out why this was happening.

daffl commented 10 years ago

Closed via #23