google-sheets-blog-cms
google-sheets-blog-cms copied to clipboard
Error with Google Script
Hey, Love the script! When I try to run it Google gives me the error of
TypeError: Cannot call method "slice" of undefined. (line 60, file"Code")
Lines 59 - 60
function paginate(posts, page) { var postsCopy = posts.slice(); var postsChunked = []; var postsPaginated = { posts: [], pages: { previous: null, next: null } };
If you could help me out that would be great.
I had this issue until I published the Sheet. You must make it public using the "Share" button, but also from the File menu: "Publish to the web..."