mirror of
https://github.com/nasa/openmct.git
synced 2025-02-06 11:09:21 +00:00
Correct Typo, check with hasOwnProperty
Update warning message with correct wording, and change check for label property such that a blank label will also trigger the deprecation warning. Addresses feedback from https://github.com/nasa/openmct/pull/1571
This commit is contained in:
parent
c5161887e2
commit
08a8207f64
@ -63,10 +63,10 @@ define(['./Type'], function (Type) {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
TypeRegistry.prototype.standardizeType = function (typeDef) {
|
TypeRegistry.prototype.standardizeType = function (typeDef) {
|
||||||
if (typeDef.label) {
|
if (typeDef.hasOwnProperty('label')) {
|
||||||
console.warn(
|
console.warn(
|
||||||
'DEPRECIATION WARNING typeDef: ' + typeDef.label + '. ' +
|
'DEPRECATION WARNING typeDef: ' + typeDef.label + '. ' +
|
||||||
'`label` is depreciated in type definitions. Please use ' +
|
'`label` is deprecated in type definitions. Please use ' +
|
||||||
'`name` instead. This will cause errors in a future version ' +
|
'`name` instead. This will cause errors in a future version ' +
|
||||||
'of Open MCT. For more information, see ' +
|
'of Open MCT. For more information, see ' +
|
||||||
'https://github.com/nasa/openmct/issues/1568');
|
'https://github.com/nasa/openmct/issues/1568');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user