فهرست منبع

amend comments, remove return type from Dish translate

d98762625 6 سال پیش
والد
کامیت
aa9bf08157
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      src/core/Dish.mjs

+ 3 - 3
src/core/Dish.mjs

@@ -370,7 +370,7 @@ class Dish {
     }
 
     /**
-     * Convert this.value to a ByteArray
+     * Convert this.value to an ArrayBuffer
      *
      * If running in a browser, _toByteArray is asynchronous.
      *
@@ -404,14 +404,14 @@ class Dish {
         };
 
         try {
-            return toByteArrayFuncs[Utils.isNode() && "node" || "browser"][this.type]();
+            toByteArrayFuncs[Utils.isNode() && "node" || "browser"][this.type]();
         } catch (err) {
             throw new DishError(`Error translating from ${Dish.enumLookup(this.type)} to ArrayBuffer: ${err}`);
         }
     }
 
     /**
-     * Convert this.value to the given type.
+     * Convert this.value to the given type from ArrayBuffer
      *
      * @param {number} toType - the Dish enum to convert to
      * @param {boolean} [notUTF8=false] - Do not treat strings as UTF8.