diff --git a/SpBlocklyJS/faceapi_recognize_20201012/faceapi-recognition_video.js b/SpBlocklyJS/faceapi_recognize_20201012/faceapi-recognition_video.js index bf90aa1dd2..325d3aa100 100644 --- a/SpBlocklyJS/faceapi_recognize_20201012/faceapi-recognition_video.js +++ b/SpBlocklyJS/faceapi_recognize_20201012/faceapi-recognition_video.js @@ -132,7 +132,7 @@ function loadCaptureImages() { facelabels.map(async function(label, index) { const descriptions = [] var n = prompt("Label name"); - if (n!="") { + if (n) { context.drawImage(source,0,0,source.width,source.height); var img = document.createElement('img'); img.src = canvas.toDataURL("image/jpeg", 1.0); @@ -142,4 +142,4 @@ function loadCaptureImages() { } }) ) -} \ No newline at end of file +}