Skip to content

bugfix: #387, if new markdown and old markdown are empty, no need to … - #391

Closed
Jocs wants to merge 1 commit into
masterfrom
bug-387
Closed

Jocs wants to merge 1 commit into
masterfrom
bug-387

Conversation

@Jocs

@Jocs Jocs commented Jun 21, 2018

Copy link
Copy Markdown
Member

…save or change status

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
New tests added? not needed
Fixed tickets #387
License MIT

Description

[Description of the bug or feature]

--

Please, don't submit /dist files with your PR!

@Jocs
Jocs requested a review from fxha June 21, 2018 15:24
// set history
if (history) commit('SET_HISTORY', history)
// if new markdown and old markdown are empty, no need to save or change status
if (!/\S/.test(markdown) && !/\S/.test(oldMarkdown)) return

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why you check for white-spaces? Does the following not catch it the empty case too?

L400 if (markdown !== oldMarkdown) {

Or do you want catch the \n case which is automatically added sometimes? Then I would check for one new-line only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants