[bug fix]

bug description:
scan success callback return null string before 
return the scan result. 

bug reported by:
Alexandre

Fix description: 
The bug is caused by a bad logic in plugin's js
file. Once we find the result format, function
should ends.