mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
🐛 ensure tag property exists before trying to trim it (#578)
no issue - fixes error thrown when you focus in/focus out of a field in the tags editor without entering anything
This commit is contained in:
parent
7180927129
commit
4a1c548e5b
1 changed files with 3 additions and 1 deletions
|
@ -18,7 +18,9 @@ export default Controller.extend({
|
|||
let tag = this.get('tag');
|
||||
let currentValue = tag.get(propKey);
|
||||
|
||||
newValue = newValue.trim();
|
||||
if (newValue) {
|
||||
newValue = newValue.trim();
|
||||
}
|
||||
|
||||
// Quit if there was no change
|
||||
if (newValue === currentValue) {
|
||||
|
|
Loading…
Add table
Reference in a new issue