Use data-type="number" for numeric meta values (#26775)

GitOrigin-RevId: 844f56383457ee7f2043af553b7dd5ae1b33f8a9
This commit is contained in:
Alf Eaton
2025-07-10 08:07:04 +00:00
committed by Copybot
parent b165fea0de
commit b843603bb1
5 changed files with 7 additions and 6 deletions
+2 -1
View File
@@ -159,7 +159,7 @@ export interface Meta {
'ol-languages': SpellCheckLanguage[]
'ol-learnedWords': string[]
'ol-legacyEditorThemes': string[]
'ol-licenseQuantity': number | undefined
'ol-licenseQuantity'?: number
'ol-loadingText': string
'ol-managedGroupSubscriptions': ManagedGroupSubscription[]
'ol-managedInstitutions': ManagedInstitution[]
@@ -320,6 +320,7 @@ export default function getMeta<T extends keyof Meta>(name: T): Meta[T] {
value = element.hasAttribute('content')
break
case 'json':
case 'number':
if (!plainTextValue) {
// JSON.parse('') throws
value = undefined