Skip to content

Commit 2346d51

Browse files
author
Aleksi Pekkala
committed
Update comment, remove redundant null check
1 parent dc50de6 commit 2346d51

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/driver/BaseDriver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export abstract class BaseDriver {
135135

136136
protected transformResult(result: any, action: ActionMetadata, options: Action): any {
137137
// check if we need to transform result
138-
const shouldTransform = (this.useClassTransformer && this.useResponseClassTransformer && result != null) // transform only if enabled and value exist
138+
const shouldTransform = (this.useClassTransformer && this.useResponseClassTransformer) // transform only if both general and response-specific transformation is enabled
139139
&& result instanceof Object // don't transform primitive types (string/number/boolean)
140140
&& !(
141141
result instanceof Uint8Array // don't transform binary data

0 commit comments

Comments
 (0)