The function Number.prototype.toPrecision cannot accept an invalid argument. The argument to the function toPrecision must between 1 and 21 (inclusive).
To correct this error
-
Ensure the argument to toPrecision is not too large or too small.