initial value of 1 for page

This commit is contained in:
Daniel Lugo 2020-06-25 18:45:31 -04:00
parent d02085abea
commit 552e625e5f

View file

@ -1302,7 +1302,7 @@ const createPost = async (tags, title, content) => {
.get(Key.PAGES)
.get(pageIdx)
.get(Key.COUNT)
.put(count + 1, ack => {
.put(shouldBeNewPage ? 1 : count + 1, ack => {
if (ack.err) {
throw new Error(ack.err)
}