From 90133ea33e4fc0ac52bcd4d24e8f78a1ab96cea2 Mon Sep 17 00:00:00 2001 From: Cole Bemis Date: Thu, 17 May 2018 23:44:35 -0700 Subject: [PATCH] build(algolia): Add objects *after* clearing index --- bin/sync-algolia.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/sync-algolia.js b/bin/sync-algolia.js index 9da4d98..5339f82 100644 --- a/bin/sync-algolia.js +++ b/bin/sync-algolia.js @@ -27,10 +27,10 @@ function syncAlgolia() { index.clearIndex((err, content) => { if (err) throw err; console.log(content); - }); - index.addObjects(records, (err, content) => { - if (err) throw err; - console.log(content); + index.addObjects(records, (err, content) => { + if (err) throw err; + console.log(content); + }); }); }