check Buffer.prototype[inspectSym] and SlowBuffer.prototype[inspectSym] are valid before trying to replace them.
This basically just disables the modification to inspection for node versions which supply an invalid inspect.custom, but at least it no longer kills the whole application.
check Buffer.prototype[inspectSym] and SlowBuffer.prototype[inspectSym] are valid before trying to replace them. This basically just disables the modification to inspection for node versions which supply an invalid inspect.custom, but at least it no longer kills the whole application.