Skip to content

Commit aa2f4bf

Browse files
authored
Merge pull request #1392 from hcaumo/1391-standardize-boolean-values-in-env-file
Standardize boolean values and update .env file pattern
2 parents 55a7eae + 8046809 commit aa2f4bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/client-twitter/src/post.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ export class TwitterPostClient {
161161

162162
if (
163163
this.runtime.getSetting("POST_IMMEDIATELY") != null &&
164-
this.runtime.getSetting("POST_IMMEDIATELY") != ""
164+
this.runtime.getSetting("POST_IMMEDIATELY") !== ""
165165
) {
166-
postImmediately = parseBooleanFromText(
167-
this.runtime.getSetting("POST_IMMEDIATELY")
168-
);
166+
// Retrieve setting, default to false if not set or if the value is not "true"
167+
postImmediately = this.runtime.getSetting("POST_IMMEDIATELY") === "true" || false;
168+
169169
}
170170

171171
if (postImmediately) {

0 commit comments

Comments
 (0)