Commit d8f57d18 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Reset members lookup table after changing properties to configs.

Without this the lookup table will report duplicates that aren't really
there.
parent 66496271
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -264,6 +264,11 @@ module JsDuck
      return ms
    end

    # Call this when renaming or moving members inside class.
    def reset_members_lookup!
      @members_map = nil
    end

    # Returns all members of class, including the inherited and mixed in ones
    def all_members
      all = []
+3 −0
Original line number Diff line number Diff line
@@ -55,6 +55,9 @@ module JsDuck
        cls[:members][:property].delete(m)
        cls[:members][:cfg] << m
      end
      # The members lookup table inside class is no more valid, so
      # reset it.
      cls.reset_members_lookup!
    end

    # For auto-detected members/classes (which have @private == :inherit)