fix some coding style and stricter comparisons, makes scrutinizer happier

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2016-12-02 12:27:15 +01:00 committed by Bjoern Schiessle
parent 39c2d9e663
commit 056e59af7e
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
2 changed files with 4 additions and 4 deletions

View File

@ -305,7 +305,7 @@
$li.find('.popovermenu').replaceWith(this.popoverMenuTemplate(sharee));
var $edit = $li.parent().find('#canEdit-' + this.cid + '-' + sharee.shareWith);
if($edit.length == 1) {
if($edit.length === 1) {
$edit.prop('checked', sharee.hasEditPermission);
}
}
@ -338,10 +338,10 @@
if (!this._template) {
this._template = Handlebars.compile(TEMPLATE);
}
var sharees = data['sharees'];
var sharees = data.sharees;
if(_.isArray(sharees)) {
for (var i = 0; i < sharees.length; i++) {
data['sharees'][i]['popoverMenu'] = this.popoverMenuTemplate(sharees[i]);
data.sharees[i].popoverMenu = this.popoverMenuTemplate(sharees[i]);
}
}
return this._template(data);

View File

@ -404,7 +404,7 @@
}
for(var i = 0; i < shares.length; i++) {
var shareWith = shares[i];
if(shareWith['id'] == shareId) {
if(shareWith.id === shareId) {
return i;
}
}