Issue #381💬 AnsweredOpened October 5, 2017by tomichal0 reactions

Use "string" instead of "text" in type check?

快速解答by tomichal

Ah, just saw this: https://github.com/artf/grapesjs/issues/372

Read full answer below ↓

Question

The line below does not seem to work for when the "text" parameter is a string. Should the "typeof text === 'text'" really be "typeof text === 'string'"? Is there even ever a "text" type in Javascript? According to this source there isn't: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures

Thanks for any inputs and a potential fix to this (unless it's not a but and I'm just plain missing something?)

https://github.com/artf/grapesjs/blob/0934a882fa53af1b27d88ccc975028aa17f5850f/src/asset_manager/view/FileUploader.js#L76

Answers (2)

lock[bot]September 18, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.