mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-02-25 09:30:52 -08:00
Parameters widget: protect against negative $depth
This commit is contained in:
parent
82b22523aa
commit
b751f7e793
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue