mirror of
https://github.com/meld-cp/obsidian-build.git
synced 2026-07-22 07:30:25 +00:00
add array test to prevent runtime error
This commit is contained in:
parent
fb09699c1b
commit
11958fadcb
1 changed files with 5 additions and 2 deletions
|
|
@ -3,10 +3,13 @@ export class DataSet extends Array<DataSetRow> {
|
|||
public columns:string[] = [];
|
||||
|
||||
constructor( columnNames:string[] ){
|
||||
|
||||
super();
|
||||
|
||||
//console.debug( "DataSet:", {columnNames} );
|
||||
|
||||
if ( Array.isArray( columnNames ) && columnNames.length > 0 ){
|
||||
this.columns = columnNames.map( cn => cn.trim() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue