diff --git a/Jenkinsfile b/Jenkinsfile
index a70135c15..d8f472915 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -90,7 +90,7 @@ pipeline {
                         lastSuccessfulBuild = lastSuccessfulBuild.previousBuild
                     }
 
-                    if (lastSuccessfulBuild) {
+                    if (lastSuccessfulBuild != null) {
                         // Extraer el commit del build exitoso desde el changelog
                         def lastCommitHash = ""
                         lastSuccessfulBuild.changesets.each { changeSet ->