@@ -39,8 +39,8 @@ class WebHelper extends Helper {
3939 }
4040
4141 /**
42- * Register a web-based source for assets. Sources will be checked in order of registration.
43- * @param {Array.<AssetType> } types - The types of asset provided by this source .
42+ * Register a web-based store for assets. Sources will be checked in order of registration.
43+ * @param {Array.<AssetType> } types - The types of asset provided by this store .
4444 * @param {UrlFunction } getFunction - A function which computes a GET URL for an Asset
4545 * @param {UrlFunction } createFunction - A function which computes a POST URL for an Asset
4646 * @param {UrlFunction } updateFunction - A function which computes a PUT URL for an Asset
@@ -130,9 +130,9 @@ class WebHelper extends Helper {
130130 store ( assetType , dataFormat , data , assetId ) {
131131 const asset = new Asset ( assetType , assetId , dataFormat ) ;
132132 // If we have an asset id, we should update, otherwise create to get an id
133- const create = assetId === null || typeof assetId === 'undefined' ;
133+ const create = assetId !== '' || assetId === null || typeof assetId === 'undefined' ;
134134
135- // Use the first source with the appropriate asset type and url function
135+ // Use the first store with the appropriate asset type and url function
136136 const store = this . stores . filter ( s =>
137137 // Only use stores for the incoming asset type
138138 s . types . indexOf ( assetType . name ) !== - 1 && (
0 commit comments