mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 15:53:55 +00:00
Updated so if getParameter() is already defined, it will ignore redefinition
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -15,7 +15,8 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
Object.defineProperty(Array.prototype, 'getParameterEx',
|
Object.defineProperty(Array.prototype, 'getParameterEx',
|
||||||
{
|
{
|
||||||
value: function (name, defaultValue)
|
value: function (name, defaultValue)
|
||||||
@@ -40,6 +41,11 @@ Object.defineProperty(Array.prototype, 'getParameter',
|
|||||||
return (this.getParameterEx('--' + name, defaultValue));
|
return (this.getParameterEx('--' + name, defaultValue));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
catch(x)
|
||||||
|
{ }
|
||||||
|
try
|
||||||
|
{
|
||||||
Object.defineProperty(Array.prototype, 'getParameterIndex',
|
Object.defineProperty(Array.prototype, 'getParameterIndex',
|
||||||
{
|
{
|
||||||
value: function (name)
|
value: function (name)
|
||||||
@@ -55,6 +61,11 @@ Object.defineProperty(Array.prototype, 'getParameterIndex',
|
|||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
catch(x)
|
||||||
|
{ }
|
||||||
|
try
|
||||||
|
{
|
||||||
Object.defineProperty(Array.prototype, 'deleteParameter',
|
Object.defineProperty(Array.prototype, 'deleteParameter',
|
||||||
{
|
{
|
||||||
value: function (name)
|
value: function (name)
|
||||||
@@ -66,6 +77,11 @@ Object.defineProperty(Array.prototype, 'deleteParameter',
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
catch(x)
|
||||||
|
{ }
|
||||||
|
try
|
||||||
|
{
|
||||||
Object.defineProperty(Array.prototype, 'getParameterValue',
|
Object.defineProperty(Array.prototype, 'getParameterValue',
|
||||||
{
|
{
|
||||||
value: function (i)
|
value: function (i)
|
||||||
@@ -75,6 +91,9 @@ Object.defineProperty(Array.prototype, 'getParameterValue',
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
catch(x)
|
||||||
|
{ }
|
||||||
|
|
||||||
function checkParameters(parms)
|
function checkParameters(parms)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user