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
ryanhefner committed Jan 28, 2021
1 parent 2f154ed commit eaa1b1e
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 eaa1b1e

Please sign in to comment.