cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject js commit: [all] Fix lint warning in File.js
Date Wed, 09 Jan 2013 01:29:16 GMT
Updated Branches:
  refs/heads/master 0de682e1a -> 0e7611955


[all] Fix lint warning in File.js


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/0e761195
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/0e761195
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/0e761195

Branch: refs/heads/master
Commit: 0e761195589690c9466411af015041c2eba0fd6f
Parents: 0de682e
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Jan 8 20:28:55 2013 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Jan 8 20:28:55 2013 -0500

----------------------------------------------------------------------
 lib/common/plugin/File.js |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/0e761195/lib/common/plugin/File.js
----------------------------------------------------------------------
diff --git a/lib/common/plugin/File.js b/lib/common/plugin/File.js
index 9387b51..103468e 100644
--- a/lib/common/plugin/File.js
+++ b/lib/common/plugin/File.js
@@ -48,14 +48,10 @@ var File = function(name, fullPath, type, lastModifiedDate, size){
  * end {Number} The index at which to end the slice (exclusive).
  */
 File.prototype.slice = function(start, end) {
-    if (arguments.length == 0) {
-        return this;
-    }
-
     var size = this.end - this.start;
     var newStart = 0;
     var newEnd = size;
-    if (arguments.length >= 1) {
+    if (arguments.length) {
         if (start < 0) {
             newStart = Math.max(size + start, 0);
         } else {


Mime
View raw message