Skip to content

Commit

Permalink
fix null in JSON hash
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed May 20, 2018
1 parent 4a98b54 commit aa6b85e
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* fix resizer in Firefox [#395](https://github.com/jcubic/jquery.terminal/issues/395)
* fix $.terminal.columns [#394](https://github.com/jcubic/jquery.terminal/issues/394)
* fix rows() when using --size [#398](https://github.com/jcubic/jquery.terminal/issues/398)
* fix null in JSON hash

## 1.15.0

Expand Down
12 changes: 8 additions & 4 deletions js/jquery.terminal-1.15.0.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Copyright (c) 2007-2013 Alexandru Marasteanu <hello at alexei dot ro>
* licensed under 3 clause BSD license
*
* Date: Sun, 20 May 2018 12:43:02 +0000
* Date: Sun, 20 May 2018 13:05:02 +0000
*/

/* TODO:
Expand Down Expand Up @@ -2872,7 +2872,7 @@
}
$.terminal = {
version: 'DEV',
date: 'Sun, 20 May 2018 12:43:02 +0000',
date: 'Sun, 20 May 2018 13:05:02 +0000',
// colors from http://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -7546,10 +7546,13 @@
var terminal = terminals.get()[spec[0]];
// execute if belong to this terminal
if (terminal && terminal_id === terminal.id()) {
if (spec[2]) {
var defer = $.Deferred();
if (!spec[2]) {
defer.resolve();
return defer.promise();
} else {
try {
if (paused) {
var defer = $.Deferred();
resume_callbacks.push(function() {
return terminal.exec(spec[2]).done(function() {
terminal.save_state(spec[2], true, spec[1]);
Expand Down Expand Up @@ -7594,6 +7597,7 @@
}
})();// */
} catch (e) {
console.log(e);
// invalid json - ignore
}
});
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal-1.15.0.min.js

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions js/jquery.terminal-src.js
Original file line number Diff line number Diff line change
Expand Up @@ -7546,10 +7546,13 @@
var terminal = terminals.get()[spec[0]];
// execute if belong to this terminal
if (terminal && terminal_id === terminal.id()) {
if (spec[2]) {
var defer = $.Deferred();
if (!spec[2]) {
defer.resolve();
return defer.promise();
} else {
try {
if (paused) {
var defer = $.Deferred();
resume_callbacks.push(function() {
return terminal.exec(spec[2]).done(function() {
terminal.save_state(spec[2], true, spec[1]);
Expand Down Expand Up @@ -7594,6 +7597,7 @@
}
})();// */
} catch (e) {
console.log(e);
// invalid json - ignore
}
});
Expand Down
12 changes: 8 additions & 4 deletions js/jquery.terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* Copyright (c) 2007-2013 Alexandru Marasteanu <hello at alexei dot ro>
* licensed under 3 clause BSD license
*
* Date: Sun, 20 May 2018 12:43:02 +0000
* Date: Sun, 20 May 2018 13:05:02 +0000
*/

/* TODO:
Expand Down Expand Up @@ -2872,7 +2872,7 @@
}
$.terminal = {
version: 'DEV',
date: 'Sun, 20 May 2018 12:43:02 +0000',
date: 'Sun, 20 May 2018 13:05:02 +0000',
// colors from http://www.w3.org/wiki/CSS/Properties/color/keywords
color_names: [
'transparent', 'currentcolor', 'black', 'silver', 'gray', 'white',
Expand Down Expand Up @@ -7546,10 +7546,13 @@
var terminal = terminals.get()[spec[0]];
// execute if belong to this terminal
if (terminal && terminal_id === terminal.id()) {
if (spec[2]) {
var defer = $.Deferred();
if (!spec[2]) {
defer.resolve();
return defer.promise();
} else {
try {
if (paused) {
var defer = $.Deferred();
resume_callbacks.push(function() {
return terminal.exec(spec[2]).done(function() {
terminal.save_state(spec[2], true, spec[1]);
Expand Down Expand Up @@ -7594,6 +7597,7 @@
}
})();// */
} catch (e) {
console.log(e);
// invalid json - ignore
}
});
Expand Down
4 changes: 2 additions & 2 deletions js/jquery.terminal.min.js

Large diffs are not rendered by default.

0 comments on commit aa6b85e

Please sign in to comment.