mirror of
https://github.com/photonstorm/phaser
synced 2024-11-15 01:17:43 +00:00
Text.setText will check if the value given is falsey but not a zero and set to an empty string if so.
This commit is contained in:
parent
6b77ca6ae5
commit
b447665533
1 changed files with 2 additions and 2 deletions
|
@ -490,13 +490,13 @@ var Text = new Class({
|
|||
* @method Phaser.GameObjects.Text#setText
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {string|string[]} value - The text to set.
|
||||
* @param {string|string[]} value - The string, or array of strings, to be set as the content of this Text object.
|
||||
*
|
||||
* @return {Phaser.GameObjects.Text} This Text object.
|
||||
*/
|
||||
setText: function (value)
|
||||
{
|
||||
if (!value)
|
||||
if (!value && value !== 0)
|
||||
{
|
||||
value = '';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue