mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
@@ -7,7 +7,7 @@ import { isEventOrGesture } from '../../core/bindable';
|
||||
import { getBindingOptions, bindingConstants } from '../binding-builder';
|
||||
import { profile } from '../../../profiling';
|
||||
import * as debugModule from '../../../utils/debug';
|
||||
import * as platform from '../../../platform';
|
||||
import { Device } from '../../../platform';
|
||||
import { sanitizeModuleName } from '../module-name-sanitizer';
|
||||
import { resolveModuleName } from '../../../module-name-resolver';
|
||||
|
||||
@@ -115,7 +115,7 @@ const applyComponentAttributes = profile('applyComponentAttributes', (instance:
|
||||
if (attr.indexOf(':') !== -1) {
|
||||
const platformName = attr.split(':')[0].trim();
|
||||
|
||||
if (platformName.toLowerCase() === platform.device.os.toLowerCase()) {
|
||||
if (platformName.toLowerCase() === Device.os.toLowerCase()) {
|
||||
attr = attr.split(':')[1].trim();
|
||||
} else {
|
||||
continue;
|
||||
|
||||
@@ -9,7 +9,7 @@ import { debug, ScopeError, SourceError, Source } from '../../utils/debug';
|
||||
import * as xml from '../../xml';
|
||||
import { isString, isObject, isDefined } from '../../utils/types';
|
||||
import { ComponentModule, setPropertyValue, getComponentModule } from './component-builder';
|
||||
import { platformNames, device } from '../../platform';
|
||||
import { platformNames, Device } from '../../platform';
|
||||
import { profile } from '../../profiling';
|
||||
import { sanitizeModuleName } from './module-name-sanitizer';
|
||||
import { resolveModuleName } from '../../module-name-resolver';
|
||||
@@ -368,7 +368,7 @@ namespace xml2ui {
|
||||
}
|
||||
|
||||
private static isCurentPlatform(value: string): boolean {
|
||||
return value && value.toLowerCase() === device.os.toLowerCase();
|
||||
return value && value.toLowerCase() === Device.os.toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -579,7 +579,7 @@ namespace xml2ui {
|
||||
this.sourceTracker = sourceTracker;
|
||||
}
|
||||
|
||||
@profile()
|
||||
@profile
|
||||
private buildComponent(args: xml.ParserEvent): ComponentModule {
|
||||
if (args.prefix && args.namespace) {
|
||||
// Custom components
|
||||
|
||||
Reference in New Issue
Block a user