SECURITY: updates lodash from 1.3.0 to 4.17.5 (#7546)

This commit is contained in:
Joffrey JAFFEUX
2019-05-16 10:34:19 +02:00
committed by GitHub
parent cabc203885
commit d47bf8b6c4
20 changed files with 7563 additions and 5401 deletions

View File

@@ -45,7 +45,7 @@ const ColorScheme = Discourse.Model.extend(Ember.Copyable, {
changed(name) {
if (!this.originals) return false;
if (this.originals.name !== name) return true;
if (_.any(this.colors, c => c.get("changed"))) return true;
if (this.colors.any(c => c.get("changed"))) return true;
return false;
},
@@ -56,7 +56,7 @@ const ColorScheme = Discourse.Model.extend(Ember.Copyable, {
return false;
}
return !changed || this.saving || _.any(this.colors, c => !c.get("valid"));
return !changed || this.saving || this.colors.any(c => !c.get("valid"));
},
newRecord: Ember.computed.not("id"),

View File

@@ -138,7 +138,7 @@ const Theme = RestModel.extend({
@computed("theme_fields", "theme_fields.@each.error")
isBroken(fields) {
return (
fields && fields.some(field => field.error && field.error.length > 0)
fields && fields.any(field => field.error && field.error.length > 0)
);
},