fix(core): sharedStorage.keys incorrectly returns null (#458)

This commit is contained in:
bbaa 2023-02-03 20:08:21 +08:00 committed by GitHub
parent 3b83a16bc7
commit fee7e6c059
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ namespace BililiveRecorder.Core.Scripting.Runtime
public void SetItem(string key, string value) => this.storage[key] = value;
public void RemoveItem(string key) => this.storage.Remove(key);
public void Clear() => this.storage.Clear();
public string? Key(int index) => this.storage.Count < index ? this.storage.Keys.ElementAt(index) : null;
public string? Key(int index) => this.storage.Count > index ? this.storage.Keys.ElementAt(index) : null;
public int Length => this.storage.Count;
}
}