Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit ec2d0fa

Browse files
committed
Check 'pod.metadata.labels' exists before using it
1 parent e05f881 commit ec2d0fa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/deploy.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ function waitForDeployment(funcName, requestMoment, namespace, options) {
142142
const functionPods = _.filter(
143143
podsInfo.items,
144144
(pod) => (
145+
!_.isEmpty(pod.metadata.labels) &&
145146
pod.metadata.labels.function === funcName &&
146147
// Ignore pods that may still exist from a previous deployment
147148
moment(pod.metadata.creationTimestamp) >= requestMoment

0 commit comments

Comments
 (0)