Skip to content

Commit

Permalink
shorten code
Browse files Browse the repository at this point in the history
  • Loading branch information
canonbrother committed Jun 1, 2021
1 parent 455577e commit fdd5346
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ export abstract class ComposableBuffer<T> implements BufferComposer {
setter(buffer.readInt32BE() === 1)
},
toBuffer: (buffer: SmartBuffer): void => {
var v = getter().toString().toLowerCase() === 'true' ? 1 : 0
const v = getter() ? 1 : 0
buffer.writeBuffer(Buffer.from([0, 0, 0, v]))
}
}
Expand Down

0 comments on commit fdd5346

Please sign in to comment.