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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

When null is set as the value of attribute, it is get as "" #2080

Closed
syuilo opened this Issue Nov 22, 2016 · 0 comments

Comments

Projects
None yet
2 participants
@syuilo
Contributor

syuilo commented Nov 22, 2016

Congratulations on 3.0.0 release, indeed! 馃帀

Help us to manage our issues by answering the following:

Describe your issue:

If null (or undefined) is set as the value of attribute of tag, it is get as ""(Empty String).

It is a bug? or breaking change of 3.0.0? (overlooked...?)

<my-tag x={ null }></my-tag>
<my-tag>
  this.on('mount', () => {
    console.log(this.opts) // <= {x: ""} (expect: {x: null})
  })
</my-tag>

This bug(?) only encounter on v3.0.0.
In previous versions, can get null.

Can you reproduce the issue?

Yes, Compare behaviors:

3.0.0: {x: ""}
http://jsfiddle.net/wf7bkvur/130/

2.x: {x: null}
http://jsfiddle.net/wf7bkvur/125/

Which version of Riot does it affect?

v3.0.0

How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance

Thanks, Great lib! 鉂わ笍 cheers 馃嵑

@syuilo syuilo changed the title from If null is set as the value of attribute of tag, it is get as "" to When null is set as the value of attribute, it is get as "" Nov 22, 2016

@syuilo syuilo referenced this issue Nov 23, 2016

Closed

Migrate to Riot 3.0.0 #79

1 of 3 tasks complete

GianlucaGuarini added a commit that referenced this issue Mar 24, 2017

GianlucaGuarini added a commit that referenced this issue Mar 26, 2017

Merge branch 'master' into dev
* master:
  updated: fixed wrong text in the readme file
  updated: libraries sizes
  3.4.0
  added: support for style and class object attributes
  closes #2178
  updated: simplified the special expressions updates
  updated: cleaning up the update method
  updated: dbmon frames rendering strategy
  closes #2080
  closes #2103
  fixed: make sure that the riot version gets exported as string
  updated: dev dependencies
  Enable syntax highlighting of tag files
  updated: small optimization avoiding the shouldUpdate check for the anonymous tags
  updated: dev dependencies
  Delete a duplicate line

@fabien fabien referenced this issue Mar 27, 2017

Closed

Undefined not handled as empty string (in tags) #2297

1 of 7 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment