Skip to content
Snippets Groups Projects
Commit 31b2334c authored by Marijn Haverbeke's avatar Marijn Haverbeke
Browse files

[sql-hint addon] Simplification

parent b9a2eb3b
No related branches found
No related tags found
No related merge requests found
......@@ -166,14 +166,10 @@
CodeMirror.registerHelper("hint", "sql", function(editor, options) {
tables = (options && options.tables) || {};
defaultTable = (options && options.defaultTable) || false;
if ((defaultTable) && (defaultTable in tables)) {
defaultTable = tables[defaultTable];
}
else {
defaultTable = [];
}
var defaultTableName = options && options.defaultTable;
defaultTable = (defaultTableName && tables[defaultTableName] || []);
keywords = keywords || getKeywords(editor);
var cur = editor.getCursor();
var result = [];
var token = editor.getTokenAt(cur), start, end, search;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment