Skip to content

Commit

Permalink
fixed recordInstanceClass in condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Heulitig authored and amitu committed Dec 1, 2023
1 parent b234a78 commit de2e388
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions fastn-js/js/ftd.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,13 +247,11 @@ const ftd = (function() {

exports.navigate = function(url, request_data) {
let query_parameters = new URLSearchParams();
if(request_data instanceof RecordInstance) {
if(request_data instanceof fastn.recordInstanceClass) {
// @ts-ignore
for (let [header, value] of Object.entries(request_data.toObject())) {
if (header !== "url" && header !== "function" && header !== "method") {
let [key, val] = value.length === 2 ? value : [header, value];
query_parameters.set(key, val);
}
let [key, val] = value.length === 2 ? value : [header, value];
query_parameters.set(key, val);
}
}
let query_string = query_parameters.toString();
Expand Down

0 comments on commit de2e388

Please sign in to comment.