Skip to content

Commit

Permalink
Replaces spaces and slashes by underlines on unsupported column names.
Browse files Browse the repository at this point in the history
  • Loading branch information
leodutra committed Feb 13, 2017
1 parent 77b74a7 commit 9196071
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/mongodb-backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ MongoDBBackend.prototype = {
function removeUnsupportedChar(text, useRawColletionNames) {
if (!useRawColletionNames && (typeof text === 'string' || text instanceof String)) {
text = decodeURIComponent(text);
text = text.replace(/[/\s]+/g, ''); // replaces slashes and spaces
text = text.replace(/[/\s]/g, '_'); // replaces slashes and spaces
}
return text;
}
Expand Down

0 comments on commit 9196071

Please sign in to comment.