Skip to content

Commit

Permalink
Merge pull request #2696 from udecode/fix/papaparse-import
Browse files Browse the repository at this point in the history
Fix import papaparse
  • Loading branch information
zbeyens authored Oct 10, 2023
2 parents 6caf98b + 1f4a8d3 commit 84920ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/forty-apes-teach.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@udecode/plate-serializer-csv': patch
---

Fix: Named export 'parse' not found.
2 changes: 1 addition & 1 deletion packages/serializer-csv/src/deserializer/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ParseConfig } from 'papaparse';
import type { ParseConfig } from 'papaparse';

export type DeserializeCsvParseOptions = ParseConfig;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ import {
ELEMENT_TH,
ELEMENT_TR,
} from '@udecode/plate-table';
import { parse } from 'papaparse';
import papaparse from 'papaparse';

import { KEY_DESERIALIZE_CSV } from '../createDeserializeCsvPlugin';
import { DeserializeCsvParseOptions, DeserializeCsvPlugin } from '../types';

const { parse } = papaparse;

const isValidCsv = (
data: Record<string, string>[][],
errors: Record<string, string>[][],
Expand Down

0 comments on commit 84920ed

Please sign in to comment.