Permalink
Browse files

optimised return value lines to a single statement

  • Loading branch information...
1 parent 61aa813 commit 9a6b2055b92167b5ddcc572b56c4511993132247 @DimitarChristoff committed Mar 27, 2012
Showing with 1 addition and 4 deletions.
  1. +1 −4 Source/Element/Element.Data.js
@@ -48,10 +48,7 @@ requires:
this.store('dataCollection', data)
}
- if (!property)
- return data
-
- return data[formatDataProperty(property)] || null
+ return property ? data[formatDataProperty(property)] || null : data
}
})
}()

0 comments on commit 9a6b205

Please sign in to comment.