From d99b563597d9870b2a7b716f971dabe8fb50cdb8 Mon Sep 17 00:00:00 2001 From: jackehuang Date: Wed, 29 Nov 2023 17:26:09 +0800 Subject: [PATCH] fix : fix redis dataProtection value --- NewLife.Redis.Extensions/RedisXmlRepository.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NewLife.Redis.Extensions/RedisXmlRepository.cs b/NewLife.Redis.Extensions/RedisXmlRepository.cs index 3e8cf9b..47311b1 100644 --- a/NewLife.Redis.Extensions/RedisXmlRepository.cs +++ b/NewLife.Redis.Extensions/RedisXmlRepository.cs @@ -43,7 +43,7 @@ public RedisXmlRepository(Func redisFactory, String key) private IEnumerable GetAllElementsCore() { var rds = _redis ?? _redisFactory!(); - var list = rds.GetList(_key); + var list = rds.GetList(_key) ?? []; foreach (var item in list) { yield return XElement.Parse(item);