diff --git a/lib/src/protofier.ts b/lib/src/protofier.ts index e5d487cb..e2d7f951 100644 --- a/lib/src/protofier.ts +++ b/lib/src/protofier.ts @@ -24,7 +24,7 @@ import { CalculationOperation, CalculationOperator, } from './value/calculations'; -import { SassMixin } from './value/mixin'; +import {SassMixin} from './value/mixin'; /** * A class that converts [Value] objects into protobufs. @@ -329,7 +329,6 @@ export class Protofier { case 'compilerMixin': return new SassMixin(value.value.value.id); - case 'calculation': return this.deprotofyCalculation(value.value.value); diff --git a/lib/src/value/mixin.ts b/lib/src/value/mixin.ts index 2198f8f6..1d8ecd86 100644 --- a/lib/src/value/mixin.ts +++ b/lib/src/value/mixin.ts @@ -9,14 +9,14 @@ import {Value} from './index'; /** A first-class SassScript mixin. */ export class SassMixin extends Value { /** - * If this mixin is defined in the compiler, this is the unique ID that the - * compiler uses to determine which mixin it refers to. + * This is the unique ID that the compiler uses to determine which mixin it + * refers to. * * This is marked as public so that the protofier can access it, but it's not * part of the package's public API and should not be accessed by user code. * It may be renamed or removed without warning in the future. */ - readonly id: number | undefined; + readonly id: number; constructor(id: number) { super(); @@ -24,9 +24,7 @@ export class SassMixin extends Value { } equals(other: Value): boolean { - return this.id === undefined - ? other === this - : other instanceof SassMixin && other.id === this.id; + return other instanceof SassMixin && other.id === this.id; } hashCode(): number {