1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the GNU Affero General Public License v3.0.
2// See the LICENCE file in the repository root for full licence text.
3
4export function mobxArrayGet<T>(array: T[] | null | undefined, index: number): T | undefined {
5 return array != null && array.length > index ? array[index] : undefined;
6}