Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
tevanoff committed Mar 19, 2024
1 parent 3e522e8 commit 2593eba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion action-src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ import path from 'path';

import { run as runNode } from '../node-src';

const maybe = (a: string, b: any = undefined) => {
const maybe = (a: string | string[], b: any = undefined) => {
if (!a) {
return b;
}

if (Array.isArray(a)) {
return a;
}

try {
return JSON.parse(a);
} catch (e) {
Expand Down

0 comments on commit 2593eba

Please sign in to comment.