Open mikaello opened 4 years ago
The README states that the description-field is optional: https://github.com/tmpvar/stl/blame/8b69a40281c7828cd89743f73cac8f942643c722/README.md#L42
description
This is not the case. Since the description is trimmed without checking for undefined, it will crash if you don't pass in description: https://github.com/tmpvar/stl/blob/e9f72df61b88e8368980d7cb7f261e04094467dc/stl.js#L61
undefined
Solution: Remove optional from readme, check for undefined before trimming or give default value.
optional
The README states that the
description
-field is optional: https://github.com/tmpvar/stl/blame/8b69a40281c7828cd89743f73cac8f942643c722/README.md#L42This is not the case. Since the description is trimmed without checking for
undefined
, it will crash if you don't pass in description: https://github.com/tmpvar/stl/blob/e9f72df61b88e8368980d7cb7f261e04094467dc/stl.js#L61Solution: Remove
optional
from readme, check forundefined
before trimming or give default value.