Skip to content

Commit 2b099d1

Browse files
committed
jshint fixes
1 parent 39f385a commit 2b099d1

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/ui-scroll.coffee

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,10 @@ angular.module('ui.scroll', [])
113113

114114
buffer
115115

116-
Padding = (tagName) ->
117-
116+
Padding = (template) ->
117+
tagName = template.localName
118118
if tagName in ['dl']
119-
throw new Error 'ui-scroll directive does not support <' + template.localName + '> as a repeating tag: ' + template.outerHTML
119+
throw new Error 'ui-scroll directive does not support <' + tagName + '> as a repeating tag: ' + template.outerHTML
120120
tagName = 'div' if tagName not in ['li', 'tr']
121121

122122
switch tagName
@@ -141,11 +141,11 @@ angular.module('ui.scroll', [])
141141

142142
viewport.createPaddingElements = (template) ->
143143

144-
topPadding = new Padding template.localName
144+
topPadding = new Padding template
145145
element.before topPadding
146146
viewport.topPadding = (height) -> topPadding.height height
147147

148-
bottomPadding = new Padding template.localName
148+
bottomPadding = new Padding template
149149
element.after bottomPadding
150150
viewport.bottomPadding = (height) -> bottomPadding.height height
151151

@@ -175,7 +175,7 @@ angular.module('ui.scroll', [])
175175
compile: (elementTemplate, attr, compileLinker) ->
176176

177177
unless match = attr.uiScroll.match(/^\s*(\w+)\s+in\s+([\w\.]+)\s*$/)
178-
throw new Error 'Expected uiScroll in form of \'_item_ in _datasource_\' but got \'' + $attr.uiScroll + '\''
178+
throw new Error 'Expected uiScroll in form of \'_item_ in _datasource_\' but got \'' + attr.uiScroll + '\''
179179
itemName = match[1]
180180
datasourceName = match[2]
181181

@@ -561,7 +561,7 @@ angular.module('ui.scroll', [])
561561

562562
if $attr.adapter # so we have an adapter on $scope
563563
adapterOnScope = $parse($attr.adapter)($scope)
564-
if not adapterOnScope
564+
if not angular.isObject adapterOnScope
565565
$parse($attr.adapter).assign($scope, {})
566566
adapterOnScope = $parse($attr.adapter)($scope)
567567
angular.extend(adapterOnScope, adapter)

0 commit comments

Comments
 (0)