Files
librenms-librenms/lib/module/hammer.js
T
laf 35db670c97 Squashed 'lib/vis/' content from commit 1d029ca
git-subtree-dir: lib/vis
git-subtree-split: 1d029cab7b527f3b292e95d550efbf784dac8699
2015-03-28 13:50:19 +00:00

11 lines
337 B
JavaScript

// Only load hammer.js when in a browser environment
// (loading hammer.js in a node.js environment gives errors)
if (typeof window !== 'undefined') {
module.exports = window['Hammer'] || require('hammerjs');
}
else {
module.exports = function () {
throw Error('hammer.js is only available in a browser, not in node.js.');
}
}