Skip to content

Commit

Permalink
Remove console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthachatterjee committed Jul 28, 2020
1 parent 6fecdea commit 5670d4b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 24 deletions.
1 change: 0 additions & 1 deletion packages/gatsby/cache-dir/ensure-resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ Run \`gatsby clean\` to remove any cached elements.`
)
}

console.log({ pageResources: this.state.pageResources })
return this.props.children(this.state)
}
}
Expand Down
23 changes: 8 additions & 15 deletions packages/gatsby/cache-dir/gatsby-browser-entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,14 @@ const StaticQuery = props => {

return (
<StaticQueryContext.Consumer>
{staticQueryData => {
console.log({ staticQueryData })
return (
<StaticQueryDataRenderer
data={data}
query={query}
render={render || children}
staticQueryData={staticQueryData}
/>
)
}}
{staticQueryData => (
<StaticQueryDataRenderer
data={data}
query={query}
render={render || children}
staticQueryData={staticQueryData}
/>
)}
</StaticQueryContext.Consumer>
)
}
Expand Down Expand Up @@ -77,10 +74,6 @@ useStaticQuery(graphql\`${query}\`);
if (context?.[query]?.data) {
return context[query].data
} else {
console.log({
context: context,
query: query,
})
throw new Error(
`The result of this StaticQuery could not be fetched.\n\n` +
`This is likely a bug in Gatsby and if refreshing the page does not fix it, ` +
Expand Down
2 changes: 0 additions & 2 deletions packages/gatsby/cache-dir/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,8 @@ export class BaseLoader {
// TODO check all uses of this and whether they use undefined for page resources not exist
loadPage(rawPath) {
const pagePath = findPath(rawPath)
console.log({ pageDb: this.pageDb })
if (this.pageDb.has(pagePath)) {
const page = this.pageDb.get(pagePath)
console.log({ payload: page.payload })
return Promise.resolve(page.payload)
}

Expand Down
6 changes: 0 additions & 6 deletions packages/gatsby/cache-dir/production-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,6 @@ apiRunnerAsync(`onClientEntry`).then(() => {
<EnsureResources location={location}>
{({ pageResources, location }) => {
const staticQueryResults = publicLoader.getStaticQueryDb()

console.log({
pageResources: pageResources.staticQueryResults,
staticQueryResults,
})

return (
<StaticQueryContext.Provider value={staticQueryResults}>
<DataContext.Provider value={{ pageResources, location }}>
Expand Down

0 comments on commit 5670d4b

Please sign in to comment.