diff --git a/gulpfile.babel.js b/gulpfile.babel.js index 4bb5b4b0..8940896b 100644 --- a/gulpfile.babel.js +++ b/gulpfile.babel.js @@ -303,5 +303,20 @@ function bundle(cb) .pipe(dest('.release')) } - -export { build, js, vendor, viewjs, css, live, clean, resourceFileCopy, copyLocales, publish, release, bundle, makeLocales } \ No newline at end of file +export default publish; +export +{ + build, + js, + vendor, + viewjs, + css, + live, + clean, + resourceFileCopy, + copyLocales, + publish, + release, + bundle, + makeLocales +} \ No newline at end of file diff --git a/js/components/userfieldsform.js b/js/components/userfieldsform.js index ad18fb98..c0171129 100644 --- a/js/components/userfieldsform.js +++ b/js/components/userfieldsform.js @@ -3,8 +3,10 @@ import { LoadImagesLazy } from '../configs/lazy' function userfieldsform(Grocy) { - Grocy.Use("datetimepicker"); - + if (document.querySelector('.datetimepicker-input') !== null) + { + Grocy.Use("datetimepicker"); + } Grocy.Components.UserfieldsForm = {}; Grocy.Components.UserfieldsForm.Save = function(success, error)