mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Turn back on Linux CI test validation (#14241)
* Turn on Linux CI test validation * Add checks around a code block raising exceptions in unit tests * Bump node version to 12 * Add check around classList add
This commit is contained in:
@@ -313,7 +313,19 @@ export class ActionViewItem extends BaseActionViewItem {
|
||||
if (this.label) {
|
||||
this.label.classList.add('codicon');
|
||||
if (this.cssClass) {
|
||||
this.label.classList.add(...this.cssClass.split(' '));
|
||||
// {{SQL CARBON EDIT}} - avoid exception if class contains empty elements
|
||||
let classList = this.cssClass.split(' ');
|
||||
let containsEmpty = false;
|
||||
if (classList && classList.length > 0) {
|
||||
for (let i = 0; i < classList.length; ++i) {
|
||||
if (classList[i] === undefined || classList[i] === '') {
|
||||
containsEmpty = true;
|
||||
}
|
||||
}
|
||||
if (!containsEmpty) {
|
||||
this.label.classList.add(...this.cssClass.split(' '));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -345,7 +345,10 @@ class WelcomePage extends Disposable {
|
||||
workspaces = workspaces.filter(recent => !this.contextService.isCurrentWorkspace(isRecentWorkspace(recent) ? recent.workspace : recent.folderUri));
|
||||
if (!workspaces.length) {
|
||||
const recent = container.querySelector('.welcomePage') as HTMLElement;
|
||||
recent.classList.add('emptyRecent');
|
||||
// {{SQL CARBON EDIT}} - avoid unit test null ref
|
||||
if (recent && recent.classList) {
|
||||
recent.classList.add('emptyRecent');
|
||||
}
|
||||
return;
|
||||
}
|
||||
const ul = container.querySelector('.recent ul');
|
||||
|
||||
Reference in New Issue
Block a user