Skip to content

Commit 08bba1f

Browse files
committed
jshint fixes
1 parent ea36890 commit 08bba1f

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

modules/scroll/scroll.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
3838
log = console.debug || console.log;
3939
match = $attr.uiScroll.match(/^\s*(\w+)\s+in\s+([\w\.]+)\s*$/);
4040
if (!match) {
41-
throw new Error("Expected uiScroll in form of '_item_ in _datasource_' but got '" + $attr.uiScroll + "'");
41+
throw new Error('Expected uiScroll in form of \'_item_ in _datasource_\' but got \'' + $attr.uiScroll + '\'');
4242
}
4343
itemName = match[1];
4444
datasourceName = match[2];
@@ -81,7 +81,7 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
8181
if (!isDatasourceValid()) {
8282
datasource = $injector.get(datasourceName);
8383
if (!isDatasourceValid()) {
84-
throw new Error(datasourceName + " is not a valid datasource");
84+
throw new Error(datasourceName + ' is not a valid datasource');
8585
}
8686
}
8787
bufferSize = Math.max(3, +$attr.bufferSize || 10);
@@ -97,7 +97,7 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
9797
var bottomPadding, createPadding, padding, repeaterType, topPadding, viewport;
9898
repeaterType = template[0].localName;
9999
if (repeaterType === 'dl') {
100-
throw new Error("ui-scroll directive does not support <" + template[0].localName + "> as a repeating tag: " + template[0].outerHTML);
100+
throw new Error('ui-scroll directive does not support <' + template[0].localName + '> as a repeating tag: ' + template[0].outerHTML);
101101
}
102102
if (repeaterType !== 'li' && repeaterType !== 'tr') {
103103
repeaterType = 'div';
@@ -119,7 +119,7 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
119119
};
120120
return result;
121121
default:
122-
result = angular.element("<" + repeaterType + "></" + repeaterType + ">");
122+
result = angular.element('<' + repeaterType + '></' + repeaterType + '>');
123123
result.paddingHeight = result.height;
124124
return result;
125125
}
@@ -519,7 +519,7 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
519519
if (angular.isArray(newItems)) {
520520
if (newItems.length) {
521521
if (newItems.length === 1 && newItems[0] === wrapper.scope[itemName]) {
522-
522+
return inserted;
523523
} else {
524524
ndx = wrapper.scope.$index;
525525
if (ndx > first) {
@@ -564,7 +564,7 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
564564
inserted = applyUpdate(buffer[arg1 - first], arg2);
565565
}
566566
} else {
567-
throw new Error("applyUpdates - " + arg1 + " is not a valid index or outside of range");
567+
throw new Error('applyUpdates - ' + arg1 + ' is not a valid index or outside of range');
568568
}
569569
}
570570
return adjustBuffer(ridActual, inserted);
@@ -642,13 +642,13 @@ angular.module('ui.scroll', []).directive('uiScrollViewport', [
642642
}
643643
return adjustBuffer(null, inserted);
644644
};
645-
eventListener.$on("insert.item", function(event, locator, item) {
645+
eventListener.$on('insert.item', function(event, locator, item) {
646646
return doInsert(locator, item);
647647
});
648-
eventListener.$on("update.items", function(event, locator, newItem) {
648+
eventListener.$on('update.items', function(event, locator, newItem) {
649649
return doUpdate(locator, newItem);
650650
});
651-
return eventListener.$on("delete.items", function(event, locator) {
651+
return eventListener.$on('delete.items', function(event, locator) {
652652
return doDelete(locator);
653653
});
654654
};

0 commit comments

Comments
 (0)