Skip to content

Commit

Permalink
Update flatted import in ContentfulCache, fixes ryanhefner/next-conte…
Browse files Browse the repository at this point in the history
  • Loading branch information
alexleonardochristachomolina committed Jan 28, 2021
1 parent bb1be2f commit 1e2d646
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ContentfulCache.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const Flatted = require('flatted/cjs');
import { parse } from 'flatted'

export default class ContentfulCache {
constructor(cache) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1e2d646

Please sign in to comment.