I have the following code:
import fn from '../some-file';
export default (fileName) => {
const match = fileName.match(/some expression/);
if (match) {
return fn;
}
return null;
};
it thinks that const match = fileName.match() is causing a destructuring issue.