fix not working trailingSlash validation since dropping of Lion framework

This commit is contained in:
ralf 2024-11-16 14:04:08 +01:00
parent 0b08b33a8e
commit 63e566ad6c

View File

@ -80,16 +80,16 @@ export class Et2Url extends Et2InvokerMixin(Et2Textbox)
*/ */
_oldChange(_ev: Event): boolean _oldChange(_ev: Event): boolean
{ {
const value = this.modelValue; const value = this.value;
if (typeof this.trailingSlash !== 'undefined' && value && this.trailingSlash !== (value.substr(-1)==='/')) if (typeof this.trailingSlash !== 'undefined' && value && this.trailingSlash !== (value.substr(-1)==='/'))
{ {
if (!this.trailingSlash) if (!this.trailingSlash)
{ {
this.modelValue = value.replace(/\/+$/, ''); this.value = value.replace(/\/+$/, '');
} }
else else
{ {
this.modelValue += '/'; this.value += '/';
} }
} }
return super._oldChange(_ev); return super._oldChange(_ev);