Check if the google font is an array or not
This commit is contained in:
parent
ab980fd942
commit
12a71b8a8b
|
|
@ -2961,11 +2961,20 @@ tarteaucitron.services.googlefonts = {
|
|||
return;
|
||||
}
|
||||
tarteaucitron.addScript('//ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', '', function () {
|
||||
|
||||
if (tarteaucitron.user.googleFonts instanceof Array) {
|
||||
WebFont.load({
|
||||
google: {
|
||||
families: tarteaucitron.user.googleFonts
|
||||
}
|
||||
});
|
||||
} else {
|
||||
WebFont.load({
|
||||
google: {
|
||||
families: [tarteaucitron.user.googleFonts]
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue