Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Photoshop's JavaScript engine thinks undefined < 0. ಠ_ಠ

  • Loading branch information...
commit 153c465b45e38959f46b6452f39c9b00672d9680 1 parent c0e87b3
Thomas Robinson authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/file.js
View
6 lib/file.js
@@ -93,8 +93,10 @@ exports.open = function (path, mode, options) {
var lineBuffering = buffering == 1 || buffering === undefined && raw.isatty && raw.isatty();
// leaving buffering undefined is a signal to the engine implementation
// that it ought to pick a good size on its own.
- if (buffering < 0) {
- throw new Error("invalid buffering size");
+
+ // Photoshop's JavaScript engine thinks undefined < 0. ಠ_ಠ
+ if (buffering !== undefined && buffering < 0) {
+ throw new Error("invalid buffering size: " + buffering);
}
if (buffering === 0) {
throw new Error("can't have unbuffered text IO");
Please sign in to comment.
Something went wrong with that request. Please try again.