@@ -785,12 +785,13 @@ var Stack = function () {
785785 } , {
786786 key : 'Assets' ,
787787 value : function Assets ( uid ) {
788- var asset = new _assets2 . default ( ) ;
789788 this . type = 'asset' ;
790789 if ( uid && typeof uid === "string" ) {
790+ var asset = new _assets2 . default ( ) ;
791791 asset . asset_uid = uid ;
792+ return Utils . merge ( asset , this ) ;
792793 }
793- return Utils . merge ( asset , this ) ;
794+ return this ;
794795 }
795796
796797 /**
@@ -1472,7 +1473,6 @@ var Query = function (_Entry) {
14721473
14731474 _this . _query = _this . _query || { } ;
14741475 _this . _query [ 'query' ] = _this . _query [ 'query' ] || { } ;
1475-
14761476 /**
14771477 * @method lessThan
14781478 * @description This method provides only the entries with values less than the specified value for a field.
@@ -2448,30 +2448,27 @@ var Assets = function () {
24482448 * @example Assets().Query()
24492449 * @returns {Query }
24502450 */
2451+ // Query() {
2452+ // let query = new Query();
2453+ // return Utils.merge(query, this);
2454+ // }
24512455
2456+ /**
2457+ * @method toJSON
2458+ * @description This method is used to convert the result in to plain javascript object.
2459+ * @example
2460+ * assetQuery
2461+ * .toJSON()
2462+ * .then(function (result) {
2463+ * let value = result.get(field_uid)
2464+ * },function (error) {
2465+ * // error function
2466+ * })
2467+ * @returns {Object }
2468+ */
24522469
2453- _createClass ( Assets , [ {
2454- key : 'Query' ,
2455- value : function Query ( ) {
2456- var query = new _query2 . default ( ) ;
2457- return Utils . merge ( query , this ) ;
2458- }
24592470
2460- /**
2461- * @method toJSON
2462- * @description This method is used to convert the result in to plain javascript object.
2463- * @example
2464- * assetQuery
2465- * .toJSON()
2466- * .then(function (result) {
2467- * let value = result.get(field_uid)
2468- * },function (error) {
2469- * // error function
2470- * })
2471- * @returns {Object }
2472- */
2473-
2474- } , {
2471+ _createClass ( Assets , [ {
24752472 key : 'toJSON' ,
24762473 value : function toJSON ( ) {
24772474 this . tojson = true ;
0 commit comments