mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-18 07:44:51 +00:00
Parameters widget: protect against negative $depth
This commit is contained in:
parent
82b22523aa
commit
b751f7e793
@ -42,7 +42,7 @@ Compute the internal state of the widget
|
|||||||
*/
|
*/
|
||||||
ParametersWidget.prototype.execute = function() {
|
ParametersWidget.prototype.execute = function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
this.parametersDepth = parseInt(this.getAttribute("$depth","1"),10) || 1;
|
this.parametersDepth = Math.max(parseInt(this.getAttribute("$depth","1"),10) || 1,1);
|
||||||
// Find the parent transclusions
|
// Find the parent transclusions
|
||||||
var pointer = this.parentWidget,
|
var pointer = this.parentWidget,
|
||||||
depth = this.parametersDepth;
|
depth = this.parametersDepth;
|
||||||
|
Loading…
Reference in New Issue
Block a user