Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using clone() on a query throws an error. #118

Closed
michaldrabik opened this issue May 14, 2020 · 1 comment
Closed

Using clone() on a query throws an error. #118

michaldrabik opened this issue May 14, 2020 · 1 comment
Labels

Comments

@michaldrabik
Copy link

  const query = sql().select(`c.id AS "id"`)
    .from('competitions c')
    .where(sql('c.id = 999'))

  const cloned = query.clone()

Running this simple example causes clone() to throw with following error:

Cannot read property 'apply' of undefined\n at /home//node_modules/sql-bricks/node_modules /underscore/underscore.js:229:48\n at Array.map ()\n at Function..map..collect (/home//node_modules/sql-bricks/node_modules/underscore/underscore.js:97:56)

@prust
Copy link
Collaborator

prust commented May 15, 2020

@michaldrabik: Thanks so much for reporting this! As you saw, it's fixed in #119. I deployed the fix to npm as v2.0.5.

@prust prust closed this as completed May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants