Skip to content

Commit e1b8d3b

Browse files
committed
refactor: simplified isString
1 parent 6db29c6 commit e1b8d3b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

packages/common/test/utils/shared.utils.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ describe('Shared utils', () => {
4444
});
4545
it('should returns false when object is not string', () => {
4646
expect(isString(false)).to.be.false;
47+
expect(isString(null)).to.be.false;
48+
expect(isString(undefined)).to.be.false;
4749
});
4850
});
4951
describe('isConstructor', () => {

packages/microservices/client/client-proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@ export abstract class ClientProxy {
8787
}
8888

8989
protected normalizePattern<T = any>(pattern: T): string {
90-
return pattern && isString(pattern) ? pattern : JSON.stringify(pattern);
90+
return isString(pattern) ? pattern : JSON.stringify(pattern);
9191
}
9292
}

0 commit comments

Comments
 (0)