In current implementation of the price_format function within constant.js . I encountered an issue when the input price does not match the expected pattern. Specifically, the price.match(/.*\$([0-9.]+)/) expression returns undefined for inputs that do not contain the pattern. This leads to a subsequent error when attempting to access the length property of undefined in the line if (formatedPrice.length > 0).
In current implementation of the price_format function within constant.js . I encountered an issue when the input price does not match the expected pattern. Specifically, the price.match(/.*\$([0-9.]+)/) expression returns undefined for inputs that do not contain the pattern. This leads to a subsequent error when attempting to access the length property of undefined in the line if (formatedPrice.length > 0).