mirror of
https://github.com/DeterminateSystems/magic-nix-cache-action.git
synced 2024-12-26 01:12:17 +01:00
fixup
This commit is contained in:
parent
2e9d44ddf6
commit
66d0f1790f
3 changed files with 7 additions and 6 deletions
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
|
@ -95322,8 +95322,8 @@ const getMacOsInfo = async () => {
|
|||
};
|
||||
function getPropertyViaWithDefault(data, names, defaultValue) {
|
||||
for (const name of names) {
|
||||
const ret = getPropertyWithDefault(data, name, undefined);
|
||||
if (ret !== undefined) {
|
||||
const ret = getPropertyWithDefault(data, name, defaultValue);
|
||||
if (ret !== defaultValue) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
4
dist/platform.js
generated
vendored
4
dist/platform.js
generated
vendored
|
@ -29,8 +29,8 @@ const getMacOsInfo = async () => {
|
|||
};
|
||||
function getPropertyViaWithDefault(data, names, defaultValue) {
|
||||
for (const name of names) {
|
||||
const ret = getPropertyWithDefault(data, name, undefined);
|
||||
if (ret !== undefined) {
|
||||
const ret = getPropertyWithDefault(data, name, defaultValue);
|
||||
if (ret !== defaultValue) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,8 +52,9 @@ function getPropertyViaWithDefault<T, Property extends string>(
|
|||
defaultValue: T,
|
||||
): T {
|
||||
for (const name of names) {
|
||||
const ret: T | undefined = getPropertyWithDefault(data, name, undefined);
|
||||
if (ret !== undefined) {
|
||||
const ret: T = getPropertyWithDefault(data, name, defaultValue);
|
||||
|
||||
if (ret !== defaultValue) {
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue