Skip to content

Commit

Permalink
Make compatible with Vite
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- authored Mar 18, 2022
1 parent cdfa824 commit b4c6ef9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/rsocket-core/src/LiteBuffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ import ExistingBufferModule from 'buffer';

const hasGlobalBuffer =
typeof global !== 'undefined' && global.hasOwnProperty('Buffer');
const hasBufferModule = ExistingBufferModule.hasOwnProperty('Buffer');
let hasBufferModule = false;
try {
hasBufferModule = ExistingBufferModule.hasOwnProperty('Buffer');
} catch (e) {
}

function notImplemented(msg?: string): void {
const message = msg ? `Not implemented: ${msg}` : 'Not implemented';
Expand Down

0 comments on commit b4c6ef9

Please sign in to comment.