Skip to content

Commit

Permalink
fix(draft): metadata changes don't flip pristine bit
Browse files Browse the repository at this point in the history
  • Loading branch information
emorikawa committed Apr 29, 2016
1 parent dec047b commit 31fb621
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/flux/stores/draft-editing-session.coffee
Expand Up @@ -39,9 +39,9 @@ class DraftChangeSet
clearTimeout(@_timer)
@_timer = null

add: (changes) =>
add: (changes, {doesNotAffectPristine}) =>
@_pending = _.extend(@_pending, changes)
@_pending['pristine'] = false
@_pending['pristine'] = false unless doesNotAffectPristine
@_onAltered()

clearTimeout(@_timer) if @_timer
Expand All @@ -50,7 +50,7 @@ class DraftChangeSet
addPluginMetadata: (pluginId, metadata) =>
changes = {}
changes["#{MetadataChangePrefix}#{pluginId}"] = metadata
@add(changes)
@add(changes, {doesNotAffectPristine: true})

commit: ({noSyncback}={}) =>
@_commitChain = @_commitChain.finally =>
Expand Down

0 comments on commit 31fb621

Please sign in to comment.