@@ -60,8 +60,8 @@ define(['underscore'], function (_underscore) {
60
60
/**
61
61
* Sets up event attributes depending on name and args
62
62
*
63
- * @param name
64
- * @param args
63
+ * @param { String } name
64
+ * @param { Array } args
65
65
*/
66
66
setupEventAttributes = function ( name , args ) {
67
67
var arrayName = name . split ( ':' ) ,
@@ -90,11 +90,17 @@ define(['underscore'], function (_underscore) {
90
90
args . originalContentType . config : { } ;
91
91
}
92
92
93
- if ( name . indexOf ( 'removeAfter' ) !== - 1 ) action = 'remove' ;
93
+ if ( name . indexOf ( 'removeAfter' ) !== - 1 ) {
94
+ action = 'remove' ;
95
+ }
94
96
95
- if ( name . indexOf ( 'createAfter' ) !== - 1 ) action = 'create' ;
97
+ if ( name . indexOf ( 'createAfter' ) !== - 1 ) {
98
+ action = 'create' ;
99
+ }
96
100
97
- if ( name . indexOf ( 'renderAfter' ) !== - 1 ) action = 'edit' ;
101
+ if ( name . indexOf ( 'renderAfter' ) !== - 1 ) {
102
+ action = 'edit' ;
103
+ }
98
104
99
105
eventAttributes =
100
106
! _underscore . isUndefined ( args . contentType ) &&
@@ -104,10 +110,9 @@ define(['underscore'], function (_underscore) {
104
110
} ;
105
111
106
112
/**
107
- * Checks if visibility has changed from previousState to state
113
+ * Returns true when visibility has changed from previousState to state
108
114
*
109
- * @param objectWrapper
110
- * @return {boolean } Returns true when the display attribute on previousState is different from state
115
+ * @param {Object } objectWrapper
111
116
*/
112
117
hasVisibilityChanged = function ( objectWrapper ) {
113
118
var state ,
@@ -121,7 +126,9 @@ define(['underscore'], function (_underscore) {
121
126
state = ! _underscore . isUndefined ( objectWrapper . dataStore . state ) ?
122
127
objectWrapper . dataStore . state . display : '' ;
123
128
124
- if ( previousState !== state && previousState !== '' && state !== '' ) return true ;
129
+ if ( previousState !== state && previousState !== '' && state !== '' ) {
130
+ return true ;
131
+ }
125
132
}
126
133
127
134
return false ;
0 commit comments