node-datadog-metrics icon indicating copy to clipboard operation
node-datadog-metrics copied to clipboard

Only call `unref()` when it exists

Open Mr0grog opened this issue 2 years ago • 0 comments

Not all JavaScript environments have an .unref() function on timers. This guards the one usage of .unref() so as not to cause exceptions in environments that do not have it.

It solves the one issue explicitly called out in #43, but I didn’t actually do any testing with browsers, and don’t know if there might be other barriers to browser-based usage yet to be solved.

Mr0grog avatar Sep 15 '22 23:09 Mr0grog