Merge pull request #1904 from ecency/nt/editor-tweaks

Nt/editor tweaks
This commit is contained in:
Feruz M 2021-04-09 08:51:44 +03:00 committed by GitHub
commit 20652cf968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ const TagInput = ({
const _handleOnChange = (_text) => {
setText(_text.replace(/,/g, ' ').replace(/#/g, ''));
let cats = _text.split(' ');
let cats = _text.trim().split(' ');
if (handleTagChanged && cats.length > 0) {
cats.length > 10
? setWarning(intl.formatMessage({ id: 'editor.limited_tags' }))

View File

@ -799,7 +799,7 @@ class EditorContainer extends Component {
let jsonMeta = {};
try {
const oldJson = JSON.parse(jsonMetadata);
const oldJson = jsonMetadata; //already parsed in postParser.js
jsonMeta = makeJsonMetadataForUpdate(oldJson, meta, tags);
} catch (e) {
jsonMeta = makeJsonMetadata(meta, tags);