Commit c3c1bb10 authored by Aral Balkan's avatar Aral Balkan
Browse files

Use class name instead of this to refer to class fields

(This is to workaround a bug in esbuild: https://github.com/evanw/esbuild/issues/885)
parent 75104805
......@@ -4,7 +4,7 @@
//
// Constants that represent supported operators in queries.
//
// Like this? Fund us!
// Like QueryOperators? Fund us!
// https://small-tech.org/fund-us
//
// Copyright ⓒ 2020-2021 Aral Balkan. Licensed under AGPLv3 or later.
......@@ -18,12 +18,15 @@ export default class QueryOperators {
static STRICT_DOES_NOT_EQUAL = '!=='
static RELATIONAL_OPERATORS = {
is: this.STRICT_EQUALS,
isEqualTo: this.STRICT_EQUALS,
equals: this.STRICT_EQUALS,
// Note: do not use “this” here until this bug in esbuild is fixed
// ===== as it messes up the distribution bundle:
// https://github.com/evanw/esbuild/issues/885
is: QueryOperators.STRICT_EQUALS,
isEqualTo: QueryOperators.STRICT_EQUALS,
equals: QueryOperators.STRICT_EQUALS,
isNot: this.STRICT_DOES_NOT_EQUAL,
doesNotEqual: this.STRICT_DOES_NOT_EQUAL,
isNot: QueryOperators.STRICT_DOES_NOT_EQUAL,
doesNotEqual: QueryOperators.STRICT_DOES_NOT_EQUAL,
isGreaterThan: '>',
isGreaterThanOrEqualTo: '>=',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment