Merge pull request #305 from Chorer/master
fix: 传给 `view.text` 的动态数据非字符串时报错
This commit is contained in:
commit
d9e8775dab
@ -204,7 +204,7 @@ export default class Painter {
|
||||
const paddings = this._doPaddings(view);
|
||||
switch (view.type) {
|
||||
case 'text': {
|
||||
const textArray = view.text.split('\n');
|
||||
const textArray = String(view.text).split('\n');
|
||||
// 处理多个连续的'\n'
|
||||
for (let i = 0; i < textArray.length; ++i) {
|
||||
if (textArray[i] === '') {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user