mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-26 08:03:51 +02:00
Squashed 'lib/vis/' content from commit 1d029ca
git-subtree-dir: lib/vis git-subtree-split: 1d029cab7b527f3b292e95d550efbf784dac8699
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
// 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.');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
// first check if moment.js is already loaded in the browser window, if so,
|
||||
// use this instance. Else, load via commonjs.
|
||||
module.exports = (typeof window !== 'undefined') && window['moment'] || require('moment');
|
||||
Reference in New Issue
Block a user