Skip to content

Commit

Permalink
new code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Oct 16, 2018
1 parent 6391bc4 commit e0e53d0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions src/js/ripe-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions src/js/ripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -965,8 +965,8 @@ ripe.Ripe.prototype._getQueryOptions = function(options) {
var parts = options.parts === undefined ? this.parts : options.parts;
var engraving = options.engraving === undefined ? this.engraving : options.engraving;
var country = options.country === undefined ? this.country : options.country;
var flag = options.flag === undefined ? this.flag : options.flag;
var currency = options.currency === undefined ? this.currency : options.currency;
var flag = options.flag === undefined ? this.flag : options.flag;

if (brand !== undefined && brand !== null) {
params.brand = brand;
Expand All @@ -992,14 +992,14 @@ ripe.Ripe.prototype._getQueryOptions = function(options) {
params.country = country;
}

if (flag !== undefined && flag !== null) {
params.flag = flag;
}

if (currency !== undefined && currency !== null) {
params.currency = currency;
}

if (flag !== undefined && flag !== null) {
params.flag = flag;
}

params.p = [];

for (var part in parts) {
Expand Down
12 changes: 6 additions & 6 deletions src/python/ripe_demo/static/js/ripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ ripe.Ripe.prototype.setOptions = function(options) {
this.webUrl = this.options.webUrl || "https://sandbox.platforme.com/";
this.parts = this.options.parts || {};
this.country = this.options.country || null;
this.flag = this.options.flag || null;
this.currency = this.options.currency || null;
this.flag = this.options.flag || null;
this.format = this.options.format || "jpeg";
this.backgroundColor = this.options.backgroundColor || "";
this.noDefaults = this.options.noDefaults === undefined ? false : this.options.noDefaults;
Expand Down Expand Up @@ -965,8 +965,8 @@ ripe.Ripe.prototype._getQueryOptions = function(options) {
var parts = options.parts === undefined ? this.parts : options.parts;
var engraving = options.engraving === undefined ? this.engraving : options.engraving;
var country = options.country === undefined ? this.country : options.country;
var flag = options.flag === undefined ? this.flag : options.flag;
var currency = options.currency === undefined ? this.currency : options.currency;
var flag = options.flag === undefined ? this.flag : options.flag;

if (brand !== undefined && brand !== null) {
params.brand = brand;
Expand All @@ -992,14 +992,14 @@ ripe.Ripe.prototype._getQueryOptions = function(options) {
params.country = country;
}

if (flag !== undefined && flag !== null) {
params.flag = flag;
}

if (currency !== undefined && currency !== null) {
params.currency = currency;
}

if (flag !== undefined && flag !== null) {
params.flag = flag;
}

params.p = [];

for (var part in parts) {
Expand Down
2 changes: 1 addition & 1 deletion test/js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ describe("RipeAPI", function() {
);
assert.strictEqual(result.params.country, "PT");
});

it("should include flag in params", async () => {
let result = null;

Expand Down

0 comments on commit e0e53d0

Please sign in to comment.