Fix Android 4.4 (ArrayBuffer) by a shim
This commit is contained in:
parent
aae69b65d4
commit
c5cabcd5bb
2 changed files with 12 additions and 0 deletions
|
|
@ -136,6 +136,7 @@ module.exports = function(grunt) {
|
||||||
},
|
},
|
||||||
angular: {
|
angular: {
|
||||||
src: [
|
src: [
|
||||||
|
'src/shim/shim.js',
|
||||||
'bower_components/qrcode-generator/js/qrcode.js',
|
'bower_components/qrcode-generator/js/qrcode.js',
|
||||||
'bower_components/qrcode-generator/js/qrcode_UTF8.js',
|
'bower_components/qrcode-generator/js/qrcode_UTF8.js',
|
||||||
'bower_components/moment/min/moment-with-locales.js',
|
'bower_components/moment/min/moment-with-locales.js',
|
||||||
|
|
|
||||||
11
src/shim/shim.js
Normal file
11
src/shim/shim.js
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
//---------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
// Add components what are missing in old JavaScript Engine
|
||||||
|
//
|
||||||
|
//---------------------------------------------------------------------
|
||||||
|
|
||||||
|
if (!ArrayBuffer['isView']) {
|
||||||
|
ArrayBuffer.isView = function(a) {
|
||||||
|
return a !== null && typeof(a) === "object" && a['buffer'] instanceof ArrayBuffer;
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue