From daa3d6a45b8a713472c9d8e740f9e41a531ee50c Mon Sep 17 00:00:00 2001 From: Ke Xu Date: Tue, 17 Apr 2018 22:48:30 +0900 Subject: [PATCH] check config filetype when create file --- manifest.json | 2 +- src/gas-api.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index b454b2e..fe8cbce 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "version": "4.0.2", + "version": "4.0.3", "manifest_version": 2, "default_locale": "en", "name": "__MSG_appName__", diff --git a/src/gas-api.js b/src/gas-api.js index d213a54..aa32ce6 100644 --- a/src/gas-api.js +++ b/src/gas-api.js @@ -140,7 +140,7 @@ class Gas { } gasCreateFile(file, type) { - const typeId = type === 'gs' ? 0 : 2; + const typeId = type === context.config.filetype ? 0 : 2; const payload = `7|1|7|${getBaseUrl()}\|${context.gasToken}|_|makeNewFile|19|h|${file}|1|2|3|4|2|5|6|7|6|${typeId}|`; return new Promise((resolve, reject) => { $.ajax({