mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-28 09:31:17 +01:00
fix: eliminate unnecessary try..catch
This commit is contained in:
@@ -10,12 +10,7 @@ define('forum/flags/detail', ['forum/flags/list', 'components', 'translator', 'b
|
|||||||
|
|
||||||
$('[data-action]').on('click', function () {
|
$('[data-action]').on('click', function () {
|
||||||
var action = this.getAttribute('data-action');
|
var action = this.getAttribute('data-action');
|
||||||
var uid;
|
var uid = $(this).parents('[data-uid]').attr('data-uid');
|
||||||
try {
|
|
||||||
uid = $(this).parents('[data-uid]').get(0).getAttribute('data-uid');
|
|
||||||
} catch (e) {
|
|
||||||
// noop
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'update':
|
case 'update':
|
||||||
|
|||||||
Reference in New Issue
Block a user