mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Do not use lazy requires where not needed.
This commit is contained in:
@@ -11,6 +11,13 @@ import view = require("ui/core/view");
|
||||
|
||||
global.moduleMerge(common, exports);
|
||||
|
||||
var color: typeof colorModule;
|
||||
function ensureColor() {
|
||||
if (!color) {
|
||||
color = require("color");
|
||||
}
|
||||
}
|
||||
|
||||
function onSelectedIndexPropertyChanged(data: dependencyObservable.PropertyChangeData) {
|
||||
var view = <SegmentedBar>data.object;
|
||||
if (!view.ios || !view.items) {
|
||||
@@ -67,7 +74,7 @@ function onSelectedBackgroundColorPropertyChanged(data: dependencyObservable.Pro
|
||||
return;
|
||||
}
|
||||
|
||||
var color: typeof colorModule = require("color");
|
||||
ensureColor();
|
||||
|
||||
if (data.newValue instanceof color.Color) {
|
||||
view.ios.tintColor = data.newValue.ios;
|
||||
|
||||
Reference in New Issue
Block a user