Fix websites check.

This commit is contained in:
Mike Cao 2020-11-06 17:43:04 -08:00
parent 52456429f6
commit 1e8c1d0d18
3 changed files with 6 additions and 4 deletions

View file

@ -64,7 +64,7 @@ export default function RealtimeViews({ websiteId, data, websites }) {
pageviews
.reduce((arr, { url, website_id }) => {
if (url?.startsWith('/')) {
if (!websiteId && websites.length > 0) {
if (!websiteId && websites.length > 1) {
url = `${getDomain(website_id)}${url}`;
}
const row = arr.find(({ x }) => x === url);