]> cat aescling's git repositories - mastodon.git/commitdiff
Merge branch 'master' into glitch-soc/merge-upstream
authorThibaut Girka <thib@sitedethib.com>
Fri, 8 Mar 2019 19:15:57 +0000 (20:15 +0100)
committerThibaut Girka <thib@sitedethib.com>
Fri, 8 Mar 2019 19:15:57 +0000 (20:15 +0100)
1  2 
Gemfile.lock
app/models/account.rb
streaming/index.js

diff --cc Gemfile.lock
Simple merge
index bf2a17a7f4f9ab038ed5c21145fe80d772bae6b1,b81c641820eaaef2b002a962cc80e3450051cf7a..79eecc30620d65f878acf0a715af2037ecde3ddf
@@@ -264,12 -260,15 +264,13 @@@ class Account < ApplicationRecor
      self[:fields] = fields
    end
  
 -  DEFAULT_FIELDS_SIZE = 4
 -
    def build_fields
 -    return if fields.size >= DEFAULT_FIELDS_SIZE
 +    return if fields.size >= MAX_FIELDS
  
      tmp = self[:fields] || []
+     tmp = [] if tmp.is_a?(Hash)
  
 -    (DEFAULT_FIELDS_SIZE - tmp.size).times do
 +    (MAX_FIELDS - tmp.size).times do
        tmp << { name: '', value: '' }
      end
  
Simple merge