mirror of
https://github.com/nasa/openmct.git
synced 2025-01-29 15:43:52 +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
|
||||
*/
|
||||
TypeRegistry.prototype.standardizeType = function (typeDef) {
|
||||
if (typeDef.label) {
|
||||
if (typeDef.hasOwnProperty('label')) {
|
||||
console.warn(
|
||||
'DEPRECIATION WARNING typeDef: ' + typeDef.label + '. ' +
|
||||
'`label` is depreciated in type definitions. Please use ' +
|
||||
'DEPRECATION WARNING typeDef: ' + typeDef.label + '. ' +
|
||||
'`label` is deprecated in type definitions. Please use ' +
|
||||
'`name` instead. This will cause errors in a future version ' +
|
||||
'of Open MCT. For more information, see ' +
|
||||
'https://github.com/nasa/openmct/issues/1568');
|
||||
|
Loading…
x
Reference in New Issue
Block a user