mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
35db670c97
git-subtree-dir: lib/vis git-subtree-split: 1d029cab7b527f3b292e95d550efbf784dac8699
11 lines
337 B
JavaScript
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.');
|
|
}
|
|
}
|