mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-12 18:30:27 +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() {
|
||||
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
|
||||
var pointer = this.parentWidget,
|
||||
depth = this.parametersDepth;
|
||||
|
Loading…
Reference in New Issue
Block a user