Merge pull request #465 from jareguo/v1.0

minor tweaks
This commit is contained in:
Jare Guo
2016-03-13 15:37:52 +08:00
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -170,16 +170,16 @@ module.exports = function (properties, className, cls) {
};
}
else if (typeof val === 'function') {
if (cc.isChildClassOf(val, cc.ValueType)) {
//noinspection JSUnresolvedFunction
if (cc.RawAsset.isRawAssetType(val)) {
val = {
default: new val(),
type: val
default: '',
url: val
};
}
else {
val = {
default: cc.RawAsset.isRawAssetType(val) ? '' : null,
//noinspection JSUnresolvedFunction
default: cc.isChildClassOf(val, cc.ValueType) ? (new val()) : null,
type: val
};
}
+1 -1
View File
@@ -41,7 +41,7 @@ function downloadText (item, callback) {
url = cc.Pipeline.UrlResolver.getRawUrl(url);
var result = jsb.fileUtils.getStringFromFile(url);
if (result && typeof result === 'string') {
if (typeof result === 'string' && result) {
callback(null, result);
}
else {