Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

js_if: проверка на свойства объекта, которое null #70

Open
shastox opened this issue Feb 20, 2020 · 0 comments

Comments

@shastox
Copy link

shastox commented Feb 20, 2020

Допустим у нас есть в текущем контексте

obj : {
key : null
}

Мы не можем сделать такую проверку:

{{#js_if "this.obj.key === null"}}

{{/js_if}}

Будет ошибка:
template7.esm.js:271 Uncaught TypeError: Cannot read property 'constructor' of null

Насколько я понимаю, тут не хватает проверки на null:

if (

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

No branches or pull requests

1 participant