mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
fix text correction. fix #786
This commit is contained in:
@@ -294,7 +294,7 @@ export class Text extends Shape<TextConfig> {
|
||||
context.fillStrokeShape(this);
|
||||
}
|
||||
setText(text) {
|
||||
var str = Util._isString(text) ? text : (text || '').toString();
|
||||
var str = Util._isString(text) ? text : (text === null || text === undefined) ? '' : text + '';
|
||||
this._setAttr(TEXT, str);
|
||||
return this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user