mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-20 01:25:37 -05:00
Initialize cell source to empty array if notebook file's source is undefined. (#8189)
This commit is contained in:
@@ -674,6 +674,9 @@ export class CellModel implements ICellModel {
|
||||
|
||||
|
||||
private getMultilineSource(source: string | string[]): string | string[] {
|
||||
if (source === undefined) {
|
||||
return [];
|
||||
}
|
||||
if (typeof source === 'string') {
|
||||
let sourceMultiline = source.split('\n');
|
||||
// If source is one line (i.e. no '\n'), return it immediately
|
||||
|
||||
Reference in New Issue
Block a user