Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
Remove "No json in url" log entry (#638)
Browse files Browse the repository at this point in the history
Having json in the url is not mandatory anymore since we have routing and soon page redirection
  • Loading branch information
thangngoc89 authored and MoOx committed Aug 21, 2016
1 parent 5d93d4f commit 7b0928f
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/static/to-html/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import fs from "fs-promise"
import path from "path"

import debug from "debug"

import urlAsHtml from "./url-as-html"
import routesToUrls from "../routes-to-urls"
import urlify from "../../_utils/urlify"
Expand All @@ -17,18 +15,13 @@ if (pagesActions.FORGET === undefined) {
throw new Error("pages FORGET action is undefined")
}

const log = debug("phenomic:static:to-html")

export function setPageData(
url: string,
collection: PhenomicCollection,
store: Object
): void {
const json = collection.find((item) => item.__url === url)
if (!json) {
log(`No json in for url '${ url }'.`)
}
else {
if (json) {
// prepare page data
store.dispatch({
type: pagesActions.SET,
Expand All @@ -42,8 +35,7 @@ export function forgetPageData(
url: string,
store: Object
): void {
// forget page data to avoid having all pages data in all
// pages
// forget page data to avoid having all pages data in all pages
store.dispatch({
type: pagesActions.FORGET,
page: url,
Expand Down

0 comments on commit 7b0928f

Please sign in to comment.