Skip to content

Commit

Permalink
fix: reveiew suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Sep 12, 2022
1 parent 9b5b012 commit 92f1e15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/marshal/src/encodeToSmallcaps.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const makeEncodeToSmallcaps = ({
*/
const encodeToSmallcapsRecur = passable => {
// First we handle all primitives. Some can be represented directly as
// JSON, and some must be encoded as [SCLASS] composites.
// JSON, and some must be encoded into smallcaps strings.
const passStyle = passStyleOf(passable);
switch (passStyle) {
case 'null':
Expand Down Expand Up @@ -166,7 +166,7 @@ export const makeEncodeToSmallcaps = ({
return passable < 0n ? `${str}n` : `+${str}n`;
}
case 'copyRecord': {
if (hasOwnPropertyOf(passable, SCLASS)) {
if (hasSClass(passable)) {
// Hilbert hotel
const { [SCLASS]: sclassValue, ...rest } = passable;
/** @type {SmallcapsEncoding} */
Expand Down Expand Up @@ -417,7 +417,7 @@ export const makeDecodeFromSmallcaps = ({
// `'copyRecord'` but we'd have to harden it and it is too
// early to do that.
assert(
!hasOwnPropertyOf(restObj, SCLASS),
!hasSClass(restObj),
X`Rest must not contain its own definition of ${q(SCLASS)}`,
);
defineProperties(result, getOwnPropertyDescriptors(restObj));
Expand Down

0 comments on commit 92f1e15

Please sign in to comment.