From 3a327f008fcbb530d54348bfbb429c4ff2786387 Mon Sep 17 00:00:00 2001 From: Jesper Wrang Date: Tue, 16 Jan 2018 01:35:12 +0100 Subject: [PATCH] Added some debugging to webpack --- src/js/reddit/comment.js | 7 ++++--- webpack.dev.js | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js/reddit/comment.js b/src/js/reddit/comment.js index 6381c83..f89b5ee 100644 --- a/src/js/reddit/comment.js +++ b/src/js/reddit/comment.js @@ -36,7 +36,6 @@ const handleThreadComment = (comment, results) => { } const handleMoreChildren = (results, threadID) => ( - // console.log(results.morechildrenIDs.map(idArray => idArray)) Promise.all(results.morechildrenIDs.map(idArray => fetchMultiple(`https://oauth.reddit.com/api/morechildren?link_id=t3_${threadID}&children=`, idArray, redditAuth))) .then(responsesArrays => Promise.all(responsesArrays.map(jsonMultiple))) @@ -79,8 +78,8 @@ const handleThread = thread => { const { subreddit, id: threadID } = extractPost(thread) return Promise.all([ - ...results.continueThisThreadIDs.map(id => getThread(subreddit, threadID, id)), - // .then(subthreads => subthreads.map(subthread => handleThread(subthread)))), + ...results.continueThisThreadIDs.map(id => getThread(subreddit, threadID, id) + .then(subthread => handleThread(subthread))), handleMoreChildren(results, threadID), ]) .then(resultsArray => { @@ -89,6 +88,8 @@ const handleThread = thread => { // from all 'continue this thread' posts console.log(resultsArray) resultsArray.pop() + console.log(results) + console.log(resultsArray) }) // zip // ) diff --git a/webpack.dev.js b/webpack.dev.js index 4df4515..6a992fb 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -6,4 +6,5 @@ module.exports = merge(common, { devServer: { historyApiFallback: true, }, + devtool: 'cheap-module-eval-source-map', });