You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ag...@apache.org on 2013/01/09 02:29:16 UTC
js commit: [all] Fix lint warning in File.js
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 <ag...@chromium.org>
Authored: Tue Jan 8 20:28:55 2013 -0500
Committer: Andrew Grieve <ag...@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 {