Fix trim function which was causing some JS errors during Server Properties validation. Victoria & Joao

This commit is contained in:
Joao Pedro De Almeida Pereira 2018-03-14 17:58:01 -04:00 committed by Dave Page
parent 3c686d3fbe
commit 3c4359270e
2 changed files with 2 additions and 2 deletions

View File

@ -99,6 +99,6 @@ export class ModelValidation {
}
static isEmptyString(string) {
return _.isUndefined(string) || _.isNull(string) || string.trim() === '';
return _.isUndefined(string) || _.isNull(string) || String(string).trim() === '';
}
}

View File

@ -31,7 +31,7 @@ describe('Server#ModelValidation', () => {
model.isNew.and.returnValue(true);
model.allValues['name'] = 'some name';
model.allValues['username'] = 'some username';
model.allValues['port'] = 'some port';
model.allValues['port'] = 12345;
});
describe('No service id', () => {