Skip to content
This repository was archived by the owner on Apr 7, 2020. It is now read-only.

Commit a1e6502

Browse files
authored
Issue40 fix crush (#41)
* public renderElement method * fix crush * remove ngAnnotate for example
1 parent f5329b3 commit a1e6502

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

dist/mention.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ angular.module('ui.mention').controller('uiMention', ["$element", "$scope", "$at
202202
this.select = function () {
203203
var choice = arguments.length <= 0 || arguments[0] === undefined ? this.activeChoice : arguments[0];
204204

205+
if (!choice) {
206+
return false;
207+
}
208+
205209
// Add the mention
206210
this.mentions.push(choice);
207211

dist/mention.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/mentionController.es6.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,10 @@ angular.module('ui.mention')
173173
* @param {mixed|object} [choice] The selected choice (default: activeChoice)
174174
*/
175175
this.select = function(choice = this.activeChoice) {
176+
if (!choice) {
177+
return false;
178+
}
179+
176180
// Add the mention
177181
this.mentions.push(choice);
178182

0 commit comments

Comments
 (0)