Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

blocker "each" raise an exception in the android webview #1228

Closed
kuangpeng opened this issue May 27, 2016 · 7 comments
Closed

blocker "each" raise an exception in the android webview #1228

kuangpeng opened this issue May 27, 2016 · 7 comments

Comments

@kuangpeng
Copy link

android 5.x webview raise an exception when compile "each" blocker, that show the javascript code like

function push(expr) { if (!(expr instanceof Literal)) { expr = this.source.wrap(expr); } this.inlineStack.push(expr); return expr; }

@heke2929
Copy link

heke2929 commented Jul 7, 2016

i met the same.

@kuangpeng
Copy link
Author

i change the method to handle tpl , use the regexp in a simple function wriiten by myself.

@heke2929
Copy link

heke2929 commented Jul 7, 2016

@kuangpeng 能说下详细吗?Could u tell me some details? Any code or solution. thx

@kuangpeng
Copy link
Author

@heke2929 自己写个简易的函数,使用正则匹配参数并用值替换
var exp = new RegExp("{{" +da + "}}","gi"); tpl_html = tpl_html.replace(exp, data[da]);

这只是简单的处理,没有什么条件判断等表达式,能否适用还得看具体需求。
如果不满足需求可以选择换个模版框架。

@heke2929
Copy link

@kuangpeng 首先感谢您的答复。我先按照您的方式尝试一下。

@lawnsea
Copy link
Collaborator

lawnsea commented Nov 23, 2016

This bug doesn't provide enough information to reproduce it locally. I'm going to close it. Please reopen if you can provide a template that reproduces the failure you saw.

@lawnsea lawnsea closed this as completed Nov 23, 2016
@ghost
Copy link

ghost commented Nov 26, 2016

@lawnsea I faced this issue a minute ago. I can't see a concrete pattern to this behavior. However I have noticed that it might be occurring while I am compiling multiple handlebar templates with large json arrays simultaneously. It occurs frequently, but not always. Hope this helps.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants