fix(core): update

This commit is contained in:
Philipp Kunz 2024-02-18 23:25:57 +01:00
parent aba8182422
commit a898928bd3
2 changed files with 2 additions and 2 deletions

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@apiclient.xyz/hetznercloud', name: '@apiclient.xyz/hetznercloud',
version: '1.0.13', version: '1.0.14',
description: 'an unofficial api client for the hetzner cloud api' description: 'an unofficial api client for the hetzner cloud api'
} }

View File

@ -55,7 +55,7 @@ export class HetznerServer {
public static async getServerByLabel(hetznerAccountRefArg: HetznerAccount, labelArg: string, valueArg?: string) { public static async getServerByLabel(hetznerAccountRefArg: HetznerAccount, labelArg: string, valueArg?: string) {
const servers = await HetznerServer.getServers(hetznerAccountRefArg); const servers = await HetznerServer.getServers(hetznerAccountRefArg);
for (const server of servers) { for (const server of servers) {
if (server.data.labels[labelArg] === valueArg) { if (valueArg ? server.data.labels[labelArg] === valueArg : server.data.labels[labelArg]) {
return server; return server;
} }
} }