1
0
Fork 0
mirror of https://github.com/fog/fog-aws.git synced 2022-11-09 13:50:52 -05:00

fix null on record[:name]

This commit is contained in:
Freddy Chu 2015-04-17 17:56:46 +08:00
parent fddd1b0eb8
commit 95cad83ae0

View file

@ -61,7 +61,7 @@ module Fog
class Mock
def list_all_records(record, zone, name)
[].tap do |tmp_records|
tmp_records.push(record) if name.nil? || (!record[:name].nil? && record[:name].gsub(zone[:name],"") >= name)
tmp_records.push(record) if !record[:name].nil? && ( name.nil? || record[:name].gsub(zone[:name],"") >= name)
record.each do |key,subr|
if subr.is_a?(Hash) && key.is_a?(String) &&
key.start_with?(Fog::DNS::AWS::Mock::SET_PREFIX)