Fix issue javascript update wrong number value for false case