Fix another date range bug.

This commit is contained in:
Mike Cao 2020-09-18 19:21:16 -07:00
parent 7d25fd6876
commit d57da4c04e
2 changed files with 5 additions and 4 deletions

View File

@ -9,7 +9,7 @@ export default function useDateRange(websiteId, defaultDateRange = '24hour') {
if (typeof globalDefault === 'string') { if (typeof globalDefault === 'string') {
globalDateRange = getDateRange(globalDefault); globalDateRange = getDateRange(globalDefault);
} else { } else if (typeof globalDateRange === 'object') {
globalDateRange = { globalDateRange = {
...globalDefault, ...globalDefault,
startDate: parseISO(globalDefault.startDate), startDate: parseISO(globalDefault.startDate),

View File

@ -1,6 +1,6 @@
{ {
"name": "umami", "name": "umami",
"version": "0.39.0", "version": "0.40.0",
"description": "A simple, fast, website analytics alternative to Google Analytics. ", "description": "A simple, fast, website analytics alternative to Google Analytics. ",
"author": "Mike Cao <mike@mikecao.com>", "author": "Mike Cao <mike@mikecao.com>",
"license": "MIT", "license": "MIT",
@ -11,10 +11,12 @@
}, },
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "npm-run-all build-tracker build-lang copy-db-schema build-db-client build-app", "build": "npm-run-all build-tracker build-lang build-db build-app",
"start": "next start", "start": "next start",
"build-app": "next build", "build-app": "next build",
"build-tracker": "rollup -c rollup.tracker.config.js", "build-tracker": "rollup -c rollup.tracker.config.js",
"build-db": "npm-run-all copy-db-schema build-db-client",
"build-lang": "npm-run-all format-lang compile-lang",
"copy-db-schema": "node scripts/copy-db-schema.js", "copy-db-schema": "node scripts/copy-db-schema.js",
"build-db-schema": "dotenv prisma introspect", "build-db-schema": "dotenv prisma introspect",
"build-db-client": "dotenv prisma generate", "build-db-client": "dotenv prisma generate",
@ -23,7 +25,6 @@
"build-postgresql-schema": "dotenv prisma introspect -- --schema=./prisma/schema.postgresql.prisma", "build-postgresql-schema": "dotenv prisma introspect -- --schema=./prisma/schema.postgresql.prisma",
"build-postgresql-client": "dotenv prisma generate -- --schema=./prisma/schema.postgresql.prisma", "build-postgresql-client": "dotenv prisma generate -- --schema=./prisma/schema.postgresql.prisma",
"generate-lang": "npm-run-all extract-lang merge-lang", "generate-lang": "npm-run-all extract-lang merge-lang",
"build-lang": "npm-run-all format-lang compile-lang",
"extract-lang": "formatjs extract {pages,components}/**/*.js --out-file build/messages.json", "extract-lang": "formatjs extract {pages,components}/**/*.js --out-file build/messages.json",
"merge-lang": "node scripts/merge-lang.js", "merge-lang": "node scripts/merge-lang.js",
"format-lang": "node scripts/format-lang.js", "format-lang": "node scripts/format-lang.js",