Change escapeSingleQuotes to check if value being passed into it is a string or not. If it is, escape. If not, don't escape string.
Problem to Solve
Check if value trying to be escape is a string or not. If it is a string, escape it, if not, don't escape it. Before it was trying to run a .replace method on an undefined object.
Proposed Changes
Check if value to be escaped is a string or not.
Expected Behavior
No errors should be thrown when running npm run db:generate
Description
Change escapeSingleQuotes to check if value being passed into it is a string or not. If it is, escape. If not, don't escape string.
Problem to Solve
Check if value trying to be escape is a string or not. If it is a string, escape it, if not, don't escape it. Before it was trying to run a .replace method on an undefined object.
Proposed Changes
Check if value to be escaped is a string or not.
Expected Behavior
No errors should be thrown when running
npm run db:generate
Steps to Test Solution
npm run db:generate