From 1e2d6468f7a1cafa7e97cf70e8a1e907c765c553 Mon Sep 17 00:00:00 2001 From: alexleonardocristanchomolina Date: Thu, 28 Jan 2021 08:13:18 -0500 Subject: [PATCH] Update flatted import in ContentfulCache, fixes https://github.com/ryanhefner/next-contentful/issues/7 --- src/ContentfulCache.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ContentfulCache.js b/src/ContentfulCache.js index d4bc69a..c80be19 100644 --- a/src/ContentfulCache.js +++ b/src/ContentfulCache.js @@ -1,4 +1,4 @@ -const Flatted = require('flatted/cjs'); +import { parse } from 'flatted' export default class ContentfulCache { constructor(cache) { @@ -29,7 +29,7 @@ export default class ContentfulCache { } if (typeof cache === 'string') { - const data = Flatted.parse(cache); + const data = parse(cache); if (Symbol.iterator in Object(data)) { this.cache = new Map(data);