Skip to content

Commit 881f8c7

Browse files
committed
Don't use 'use strict'; on the global scope
If this file will be concatenated with other files, it will enforce Strict Mode on all of the other code it's concatenated with. Reference (under ```How do you use it?```): http://www.nczonline.net/blog/2012/03/13/its-time-to-start-using-javascript-strict-mode/ By moving ```'use strict';``` inside the function, we can prevent that and still get the benefits.
1 parent 35974cf commit 881f8c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sortable.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict';
2-
31
/*
42
jQuery UI Sortable plugin wrapper
53
@@ -10,6 +8,8 @@ angular.module('ui.sortable', [])
108
.directive('uiSortable', [
119
'uiSortableConfig', '$timeout', '$log',
1210
function(uiSortableConfig, $timeout, $log) {
11+
'use strict';
12+
1313
return {
1414
require: '?ngModel',
1515
link: function(scope, element, attrs, ngModel) {

0 commit comments

Comments
 (0)