imnapo / react-native-cn-quill

Quill rich-text editor for react-native
MIT License
187 stars 74 forks source link

[bug]: CustomFont Type import is failed. TypeError: fonts.forEach is not a function. #74

Closed LOMFM closed 2 years ago

LOMFM commented 2 years ago

Hi. I have installed the new version. This version has been improved by supporting the custom fonts and getSelection and setSelection function applying.

But when I try to use this, I have got this error.

TypeError: fonts.forEach is not a function. (In 'fonts.forEach(function (f) { fontCss = fontCss + ' ' + f.css; })', 'fonts.forEach' is undefined)

So I have checked the module source detail. The reason code of this bug is following code in editor_css.ts import type { CustomFont } from 'src/types'

I have changed this code to the relative path. import type { CustomFont } from '../../types' And then the error has been disappeared.

I'd like you to review the code and update this again. Thanks.