mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix trim function which was causing some JS errors during Server Properties validation. Victoria & Joao
This commit is contained in:
parent
3c686d3fbe
commit
3c4359270e
@ -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() === '';
|
||||
}
|
||||
}
|
||||
|
@ -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', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user