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

Weird thing crashes riotjs #2263

Closed
rongxike opened this issue Feb 16, 2017 · 1 comment
Closed

Weird thing crashes riotjs #2263

rongxike opened this issue Feb 16, 2017 · 1 comment
Labels

Comments

@rongxike
Copy link

@rongxike rongxike commented Feb 16, 2017

Help us to manage our issues by answering the following:

  1. Describe your issue:
    when you defined
this.Item = {
     important_level: undefined, //this crashed the riotjs
};

riot crashes
change it to _important_level: undefined everything back to normal

UPDATE: everything with important will crash the riot

this.Item = {
     important: undefined, //this crashed the riotjs
};

  1. Can you reproduce the issue?
    http://embed.plnkr.co/DzipZT0Yf4eZPrgdAd61/

  2. On which browser/OS does the issue appear?
    Latest Chrome

  3. Which version of Riot does it affect?
    3.2.1

  4. How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@Joylei
Copy link
Contributor

@Joylei Joylei commented Feb 16, 2017

it seems the compiler wrongly handled the word starts with import, assuming the following lines are import statement

https://github.com/riot/compiler/blob/master/src/core.js#L120

IMPORT_STATEMENT.test('important:"ok"')
//result is true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.