Skip to content

Commit

Permalink
jrItems - use if instead of select for possible nil
Browse files Browse the repository at this point in the history
  • Loading branch information
PabstMirror committed Sep 28, 2023
1 parent 60ed9ef commit f1a742c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/jr/fnc_compatibleItems.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ if (isNil QGVAR(namespace)) then {
};

// Get cached result, if it exists
private _cachekey = format ["%1#%2", _weapon, ["all", _typefilter] select _typeFilterExists];
private _cachekey = format ["%1#%2", _weapon, if (_typeFilterExists) then {_typefilter} else {"all"} ];
private _compatibleItems = GVAR(namespace) get _cachekey;

if (!isNil "_compatibleItems") exitWith {
Expand Down

0 comments on commit f1a742c

Please sign in to comment.