mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -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[] {
|
private getMultilineSource(source: string | string[]): string | string[] {
|
||||||
|
if (source === undefined) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
if (typeof source === 'string') {
|
if (typeof source === 'string') {
|
||||||
let sourceMultiline = source.split('\n');
|
let sourceMultiline = source.split('\n');
|
||||||
// If source is one line (i.e. no '\n'), return it immediately
|
// If source is one line (i.e. no '\n'), return it immediately
|
||||||
|
|||||||
Reference in New Issue
Block a user